Skip to content

fix: relabel tool schema dialect from draft-07 to 2020-12 (#83) - #84

Merged
DavidFuchs merged 1 commit into
mainfrom
fix/tool-schema-dialect-83
Aug 14, 2026
Merged

DavidFuchs merged 1 commit into
mainfrom
fix/tool-schema-dialect-83

Conversation

@DavidFuchs

@DavidFuchs DavidFuchs commented Aug 14, 2026 •

Copy link
Copy Markdown
Owner

Fixes #83.

The MCP SDK we use converts every tool's Zod schema to JSON Schema via zod-to-json-schema without setting a target, so it stamps "$schema": "http://json-schema.org/draft-07/schema#" on every inputSchema/outputSchema regardless of SDK version.

This is a known, still-open upstream issue (modelcontextprotocol/typescript-sdk#745) with no shipped SDK fix yet (a v2 rewrite is planned but unreleased).

This PR overwrites the schema to https://json-schema.org/draft/2020-12/schema.

The SDK converts every tool's Zod schema to JSON Schema via
zod-to-json-schema without setting a target, so it stamps
"$schema": "http://json-schema.org/draft-07/schema#" on every
inputSchema/outputSchema regardless of SDK version — verified against
both the version this project pins and the current latest release.
Clients that validate strictly against the MCP spec's default dialect
(2020-12, per SEP-1613) reject every tool outright before ever calling
it. This is a known, still-open upstream issue
(modelcontextprotocol/typescript-sdk#745).

None of this server's schemas use anything that differs between the
two drafts, so relabel the declared dialect on the way out rather than
waiting on an upstream fix or dropping outputSchema.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@DavidFuchs
DavidFuchs merged commit b288675 into main Aug 14, 2026
5 checks passed
@DavidFuchs
DavidFuchs deleted the fix/tool-schema-dialect-83 branch August 15, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

outputSchema declares JSON Schema draft-07 — every tool call fails in Claude Desktop (2020-12-only validator)

1 participant