Skip to content
{mcpdesc}

Validate embedded Tool schemas in their dialect

Tool input and output schemas must be valid under their applicable JSON Schema dialect. Unsupported declared dialects are errors; unresolved external references warn when complete offline checking is unavailable. External schemas are not fetched automatically, and a partial check is not reported as complete.

An embedded Tool inputSchema or outputSchema is valid under its declared or default JSON Schema dialect, and a declared dialect is JSON Schema 2020-12 or draft-07.

Rule ID: json-schema.tool-schema.valid
Owner: json-schema
Surface: Tool · Path: inputSchema, outputSchema
Kind: embedded-standard
Requirement level: must
JSON Schema dialects: https://json-schema.org/draft/2020-12/schema, http://json-schema.org/draft-07/schema#
Status: internal · Enforcement: internal

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

The declared dialect set is fixed by the specification, not by the validator: an unsupported dialect is an error, not a warning, because MCP guarantees only 2020-12 support and peers return an error for other dialects, and because Tool examples cannot be checked against a schema in an unknown dialect (maintainer decision on issue #72, 2026-10-26). Unresolved external references differ: offline validation forbids retrieving them, so they only warn. Earlier protocol versions define no embedded dialect; mcp.tool.schema.legacy-shape applies to those protocol versions instead.

Source: expected-warning/unresolved-external-tool-ref.json · Selected: /tools/0

{
"name": "lookup",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"identifier": {
"$ref": "https://schemas.example.com/common.json#/$defs/identifier"
}
},
"required": [
"identifier"
],
"additionalProperties": false
}
}

Source: expected-warning/unresolved-external-tool-example-ref.json · Selected: /tools/0

{
"name": "lookup",
"inputSchema": {
"type": "object",
"properties": {
"identifier": {
"$ref": "https://schemas.example.invalid/identifier.json"
}
},
"required": [
"identifier"
]
},
"examples": {
"external-identifier": {
"input": {
"identifier": "example-123"
},
"result": {
"resultType": "complete",
"content": [
{
"type": "text",
"text": "Found example-123."
}
]
}
}
}
}

Source: expected-invalid/malformed-tool-schema.json · Selected: /tools/0

{
"name": "malformed_schema",
"inputSchema": {
"type": "object",
"required": "query"
}
}

Source: expected-invalid/unresolved-local-tool-ref.json · Selected: /tools/0

{
"name": "missing_local_definition",
"inputSchema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"identifier": {
"$ref": "#/$defs/identifier"
}
}
}
}

Source: expected-invalid/unsupported-tool-schema-dialect.json · Selected: /tools/0/inputSchema

{
"$schema": "https://example.com/schemas/custom-dialect",
"type": "object"
}

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