A completed example result must contain the fields each applicable MCP protocol version requires, with valid values. Check the result’s full effective scope, not only the newest version. Fields permitted but undefined on open result types are handled separately as warnings.
Requirement
Section titled “Requirement”An example result contains every field that each applicable MCP protocol version requires, and every field a protocol version defines has a valid value.
Details
Section titled “Details”Rule ID: mcpdesc.example.result.protocol-fidelity
Owner: mcpdesc
Surface: Example result
Kind: mcpdesc-semantic
Requirement level: Not specified in the rule record
Status: internal · Enforcement: internal
Protocol version applicability
Section titled “Protocol version applicability”2024-11-05 |
2025-03-26 |
2025-06-18 |
2025-11-25 |
2026-07-28 |
|---|---|---|---|---|
| applies | applies | applies | applies | applies |
Required by
Section titled “Required by”- MCP Description 0.9.0, Sections 9.3, 10.4.4, 10.4.6, 11.3, and 11.4
- 3. Document Structure: req-carried-defined-fields
-
- Resources and Resource Templates: req-resource-example-result-shape
-
- Prompts: req-prompt-example-result-shape
- Examples fail fast decision (validation README, 2026-10-25, issue #72)
Based on
Section titled “Based on”- Tier 1 — MCP schema.ts and normative specification text: MCP 2026-07-28 schema.ts, interface Result (resultType required) and interface CacheableResult (ttlMs, cacheScope required)
Fields an MCP protocol version does not define are governed by mcp.result.additional-properties.preserve (accepted with a warning). When present, resultType must be “complete”, ttlMs non-negative, and cacheScope “public” or “private” in every applicable protocol version (document schema).
Examples
Section titled “Examples”Valid example
Section titled “Valid example”Source: expected-valid/named-tool-examples.json · Selected: /tools/0/examples
{ "paris.complete": { "input": { "city": "Paris" }, "result": { "resultType": "complete", "content": [ { "type": "text", "text": "Paris: 21.5 C" }, { "type": "image", "data": "aW1hZ2U=", "mimeType": "image/png" }, { "type": "audio", "data": "YXVkaW8=", "mimeType": "audio/wav" }, { "type": "resource", "resource": { "uri": "weather://paris/report", "mimeType": "text/plain", "text": "Clear" } }, { "type": "resource_link", "uri": "weather://paris/map", "name": "Paris map", "mimeType": "image/png" } ], "structuredContent": { "temperature": 21.5 }, "isError": false } }}Valid example
Section titled “Valid example”Source: expected-valid/named-resource-examples.json · Selected: /resources/0/examples
{ "two-files": { "result": { "contents": [ { "uri": "file:///project/src/", "mimeType": "inode/directory", "text": "main.rs\nlib.rs\n" }, { "uri": "file:///project/src/main.rs", "mimeType": "text/x-rust", "text": "fn main() {}\n", "_meta": { "captured": true } }, { "uri": "file:///project/src/lib.rs", "mimeType": "text/x-rust", "text": "pub fn answer() -> u8 { 42 }\n" } ], "_meta": { "snapshot": "example" } } }}Valid example
Section titled “Valid example”Source: expected-warning/legacy-result-meta.json · Selected: /resources/0/examples/with-result-meta/result
{ "contents": [ { "uri": "test://legacy", "text": "legacy" } ], "_meta": { "trace": "r1" }}Valid example
Section titled “Valid example”Source: expected-warning/open-results-shared-across-protocol-versions.json · Selected: /tools/0/examples/paris/result
{ "resultType": "complete", "content": [ { "type": "text", "text": "Paris: 18 C" } ]}Invalid example
Section titled “Invalid example”Source: expected-invalid/invalid-prompt-example-semantics.json · Selected: /prompts/0/examples/unknown-and-missing/result
{ "messages": [ { "role": "user", "content": { "type": "text", "text": "Summarize Paris." } } ]}Invalid example
Section titled “Invalid example”Source: expected-invalid/invalid-completion-example-semantics.json · Selected: /prompts/3/completionExamples/missing-result-type/result
{ "completion": { "values": [ "Ada" ], "hasMore": false }}Rule Source Code
Section titled “Rule Source Code”example.yaml at immutable tag v0.9.0-rc.3.