Repository navigation
fix: relabel tool schema dialect from draft-07 to 2020-12 (#83) - #84
Merged
Merged
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #83.
The MCP SDK we use converts every tool's Zod schema to JSON Schema via
zod-to-json-schemawithout setting atarget, so it stamps"$schema": "http://json-schema.org/draft-07/schema#"on everyinputSchema/outputSchemaregardless 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.