Resource example contents are compared with the declaration’s requested URI, MIME type, and declared raw size. A mutable resource can differ between observations, so size differences are warnings. Review the example and declaration together rather than inferring live content.
Requirement
Section titled “Requirement”Resource example contents agree with their declaration: the requested URI is returned, MIME types match, and raw size matches a declared size.
Details
Section titled “Details”Rule ID: mcpdesc.resource.example.consistency
Owner: mcpdesc
Surface: Resource example · Path: result.contents
Kind: mcpdesc-semantic
Requirement level: should
Protocol versions: independent of the MCP protocol version
Status: internal · Enforcement: internal
Required by
Section titled “Required by”- MCP Description 0.9.0, Section 10.4.4
- 10. Resources and Resource Templates: req-resource-example-requested-uri
-
- Resources and Resource Templates: req-resource-example-mime-type
-
- Resources and Resource Templates: req-resource-example-size
Collections and indirect reads may legitimately differ, so these are warnings.
Examples
Section titled “Examples”Accepted with a warning
Section titled “Accepted with a warning”Source: expected-warning/resource-example-consistency.json · Selected: /resources/0/examples/collection-snapshot/result
{ "contents": [ { "uri": "collection:///items/one", "mimeType": "application/vnd.example.item+json", "text": "{\"id\":1}" } ]}Rule Source Code
Section titled “Rule Source Code”resource.yaml at immutable tag v0.9.0-rc.3.