Skip to content

Conversation

@jokemanfire
Copy link
Collaborator

The spec has update.

Motivation and Context

How Has This Been Tested?

Breaking Changes

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

Additional context

@github-actions github-actions bot added T-documentation Documentation improvements T-dependencies Dependencies related changes T-config Configuration file changes T-core Core library changes T-handler Handler implementation changes labels Nov 18, 2025
@jokemanfire
Copy link
Collaborator Author

#182

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the JSON Schema generation to use the 2020-12 dialect instead of draft-07, aligning with recent updates to the Model Context Protocol specification (referenced in PR #655).

Key Changes:

  • Updated schema generation from draft07() to draft2020_12() with removal of the AddNullable transform (now handled automatically)
  • Updated schemars dev-dependency to version 1.1.0 to support the new draft
  • Refactored test to verify complete schema output instead of just checking enum count

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
crates/rmcp/src/handler/server/common.rs Updated schema generation to use draft2020_12 and removed AddNullable transform
crates/rmcp/tests/test_complex_schema.rs Enhanced test with complete schema validation matching 2020-12 format ($defs instead of definitions)
crates/rmcp/Cargo.toml Updated schemars dev-dependency to version 1.1.0
README.md Added documentation about JSON Schema 2020-12 requirement

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- [serde required](https://github.com/serde-rs/serde)

Json Schema generation(Must follow the 2020-12 version):
- [shemars required](https://github.com/GREsau/schemars)
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in "shemars" - should be "schemars".

Suggested change
- [shemars required](https://github.com/GREsau/schemars)
- [schemars required](https://github.com/GREsau/schemars)

Copilot uses AI. Check for mistakes.
[dev-dependencies]
tokio = { version = "1", features = ["full"] }
schemars = { version = "1.0", features = ["chrono04"] }
schemars = { version = "1.1.0", features = ["chrono04"] }
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dev-dependency for schemars is being updated to version 1.1.0, but the main dependency at line 32 remains at version 1.0. This creates a version mismatch that could lead to compilation issues or unexpected behavior. Since draft2020_12() requires schemars 1.1.0+, the main dependency should also be updated to match.

Consider updating the main dependency to:

schemars = { version = "1.1.0", optional = true, features = ["chrono04"] }

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jokemanfire Looks like something to look at if we need the bump across the board?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trace it in #182 , there should still be some work to be done here, and we may introduce some broken change.

@jokemanfire
Copy link
Collaborator Author

Optional data I need to confirm

@jokemanfire jokemanfire merged commit 76cdf48 into modelcontextprotocol:main Nov 19, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-config Configuration file changes T-core Core library changes T-dependencies Dependencies related changes T-documentation Documentation improvements T-handler Handler implementation changes T-test Testing related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants