Skip to content
{mcpdesc}

Keep Resource examples consistent with declarations

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.

Resource example contents agree with their declaration: the requested URI is returned, MIME types match, and raw size matches a declared size.

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

Collections and indirect reads may legitimately differ, so these are warnings.

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}"
}
]
}

resource.yaml at immutable tag v0.9.0-rc.3.