Example input must satisfy the resolved inputSchema, and successful structured output must satisfy outputSchema when supplied. Correct the example or the declaration’s schema. Where resolution or dialect support prevents complete checking, the diagnostic must make that limitation visible.
Requirement
Section titled “Requirement”A Tool example input validates against inputSchema, and its structuredContent against outputSchema, for every applicable protocol version; incomplete validation is reported.
Details
Section titled “Details”Rule ID: mcpdesc.tool.example.schema-conformance
Owner: mcpdesc
Surface: Tool example · Path: examples, interactionExamples
Kind: mcpdesc-semantic
Requirement level: must
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.2, 9.3, and 9.4
- 9. Tools: req-tool-example-input-valid
Based on
Section titled “Based on”- Tier 1 — MCP schema.ts and normative specification text: MCP 2025-06-18 to 2026-07-28 specification, Server Features, Tools, Output Schema (structured results conform to outputSchema)
- https://github.com/modelcontextprotocol/modelcontextprotocol/blob/dae694f61a31f7a3ec2af3aff709e11f70f61e48/docs/specification/2025-06-18/server/tools.mdx#L309-L382
- https://github.com/modelcontextprotocol/modelcontextprotocol/blob/dae694f61a31f7a3ec2af3aff709e11f70f61e48/docs/specification/2025-11-25/server/tools.mdx#L335-L408
- https://github.com/modelcontextprotocol/modelcontextprotocol/blob/dae694f61a31f7a3ec2af3aff709e11f70f61e48/docs/specification/2026-07-28/server/tools.mdx#L509-L631
Before MCP 2025-11-25 no embedded dialect is defined, so only the legacy shape is checked and the warning reports the gap.
Examples
Section titled “Examples”Accepted with a warning
Section titled “Accepted with a warning”Source: expected-warning/pre-dialect-tool-example.json · Selected: /tools/0/examples/friendly
{ "input": { "name": "Example User" }, "result": { "content": [ { "type": "text", "text": "Hello, Example User." } ] }}Accepted with a warning
Section titled “Accepted with a warning”Source: expected-warning/unresolved-external-tool-example-ref.json · Selected: /tools/0/examples/external-identifier
{ "input": { "identifier": "example-123" }, "result": { "resultType": "complete", "content": [ { "type": "text", "text": "Found example-123." } ] }}Invalid example
Section titled “Invalid example”Source: expected-invalid/tool-example-schema-mismatches.json · Selected: /tools/0/examples/wrong-types
{ "input": { "count": "one" }, "result": { "resultType": "complete", "content": [ { "type": "text", "text": "one" } ], "structuredContent": { "total": "one" } }}Invalid example
Section titled “Invalid example”Source: expected-invalid/component-contextual-examples.json · Selected: /components/toolExamples/bad-input
{ "input": { "query": 42 }, "result": { "resultType": "complete", "content": [], "structuredContent": { "count": "one" } }}Rule Source Code
Section titled “Rule Source Code”tool.yaml at immutable tag v0.9.0-rc.3.