Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@felixweinberger
Copy link
Collaborator

Adds conformance tests for SEP-1613 which establishes JSON Schema 2020-12 as the default dialect for MCP tool schemas.

Summary

  • Server test: validates $schema field preservation with value https://json-schema.org/draft/2020-12/schema
  • Server test: validates $defs field preservation with expected structure
  • Server test: validates additionalProperties field preservation
  • Added json_schema_2020_12_tool to everything-server with custom tools/list handler

Motivation and Context

SEP-1613 establishes JSON Schema 2020-12 as the default dialect for MCP. These conformance tests ensure SDK implementations correctly preserve JSON Schema 2020-12 keywords ($schema, $defs, additionalProperties) in tool definitions, rather than stripping them during schema conversion.

How Has This Been Tested?

  • All conformance checks pass locally
  • Test is in pending list (requires SDK PR #1135 to preserve fields on client side)

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Note

This PR requires SDK with PR #1135 merged to fully pass. The scenario is currently in pendingClientScenariosList until the SDK preserves JSON Schema 2020-12 keywords.

Add conformance test to validate that MCP servers correctly preserve
JSON Schema 2020-12 keywords ($schema, $defs, additionalProperties)
in tool definitions.

Changes:
- Add JsonSchema2020_12Scenario in src/scenarios/server/json-schema-2020-12.ts
- Add json_schema_2020_12_tool to everything-server with tools/list override
  to return raw JSON Schema instead of Zod-converted schema
- Register scenario in pendingClientScenariosList (requires SDK PR #1135)

The test is added to pending because the client SDK currently strips
the JSON Schema 2020-12 keywords. Once PR #1135 is merged into the SDK,
this scenario can be moved to the active list.
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 20, 2025

Open in StackBlitz

npx https://pkg.pr.new/modelcontextprotocol/conformance/@modelcontextprotocol/conformance@45

commit: 7290159

@pcarleton pcarleton merged commit f087e44 into main Nov 20, 2025
8 checks passed
@pcarleton pcarleton deleted the fweinberger/sep-1613-conformance branch November 20, 2025 18:20
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.

3 participants