Skip to content
{mcpdesc}

Check Tool examples against their schemas

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.

A Tool example input validates against inputSchema, and its structuredContent against outputSchema, for every applicable protocol version; incomplete validation is reported.

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

2024-11-05 2025-03-26 2025-06-18 2025-11-25 2026-07-28
applies applies applies applies applies

Before MCP 2025-11-25 no embedded dialect is defined, so only the legacy shape is checked and the warning reports the gap.

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

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

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

Source: expected-invalid/component-contextual-examples.json · Selected: /components/toolExamples/bad-input

{
"input": {
"query": 42
},
"result": {
"resultType": "complete",
"content": [],
"structuredContent": {
"count": "one"
}
}
}

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