Resource declarations and resource-link content express raw size as an integer, following MCP’s numeric schema convention. Replace a fractional value with the intended integer; the validator must not round it. No minimum is added beyond MCP’s definition.
Requirement
Section titled “Requirement”Resource size, in a declaration and in resource link content, is an integer when present.
Details
Section titled “Details”Rule ID: mcp.resource.size
Owner: mcp
Surface: Resource · Path: size
Kind: structural
Requirement level: must
Protocol versions: independent of the MCP protocol version
Document schema locations: #/$defs/resource/properties/size, #/$defs/toolResultContent/allOf/3/then/properties/size
Status: arbitrated · Enforcement: internal
Required by
Section titled “Required by”- MCP Description 0.9.0, Sections 3.6 and 10.1.1
- 10. Resources and Resource Templates: req-resource-size-integer
-
- Document Structure: req-mcp-integer-numbers
- Proposal 0029, Integer MCP Numbers
Based on
Section titled “Based on”- Tier 1 — MCP schema.ts and normative specification text: MCP 2024-11-05 to 2026-07-28 schema.ts, interface Resource, size (unannotated number); ResourceLink extends Resource from 2025-06-18
- validation/mcp-schemas/2024-11-05/schema.ts#L449
- validation/mcp-schemas/2025-03-26/schema.ts#L482
- validation/mcp-schemas/2025-06-18/schema.ts#L556
- validation/mcp-schemas/2025-11-25/schema.ts#L832
- validation/mcp-schemas/2026-07-28/schema.ts#L1471
- validation/mcp-schemas/2026-07-28/schema.ts#L1719-L1721
- Tier 3 — Generated MCP schema.json: MCP generated schema.json, Resource and ResourceLink size typed integer
- Tier 3 — Generated MCP schema.json: MCP scripts/generate-schemas.ts: typescript-json-schema –defaultNumberType integer
Gaps and arbitrations
Section titled “Gaps and arbitrations”Examples
Section titled “Examples”Valid example
Section titled “Valid example”Source: expected-valid/discriminated-unions.json · Selected: /tools/0/interactionExamples/approved/steps/1/response/content/size
12Valid example
Section titled “Valid example”Source: expected-valid/named-resource-examples.json · Selected: /resources/2/size
3Invalid example
Section titled “Invalid example”Source: expected-invalid/fractional-resource-size.json · Selected: /resources/0/size
1048576.5Invalid example
Section titled “Invalid example”Source: expected-invalid/fractional-resource-link-size.json · Selected: /tools/0/examples/listing/result/content/0/size
2048.5Invalid example
Section titled “Invalid example”Source: expected-invalid/discriminated-resource-link-size.json · Selected: /tools/0/interactionExamples/nested/steps/0/response/content/size
1.5Rule Source Code
Section titled “Rule Source Code”resource.yaml at immutable tag v0.9.0-rc.3.