[SEP-1575] changes to introduce Tool Versions #1602
Draft
+70
−0
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.
This PR adds tool versioning support to the MCP specification as defined in SEP-1575, enabling servers to declare
semantic versions for their tools and allowing clients to specify version constraints when making tool calls.
Motivation and Context
Currently, MCP tools lack versioning support, which can lead to breaking changes when tools are updated. This creates instability for clients that depend on specific tool behaviors. The tool
versioning specification addresses this by:
This specification change enables the ecosystem to evolve safely while maintaining stability for existing implementations.
How Has This Been Tested?
The specification changes have been validated through:
The companion implementation in the Python SDK includes comprehensive tests covering version parsing, constraint satisfaction, and error handling scenarios.
Breaking Changes
No breaking changes - This specification update is fully backwards compatible:
Types of changes
Checklist
Additional context
Schema Changes
Tool Definition Updates:
version
field to Tool schemaTool Call Request Updates:
tool_requirements
field to tool call requests^
,~
,>
,>=
,<
,<=
, exact versionsVersion Constraint Syntax
The specification supports familiar version constraint operators:
^
): Allows non-breaking updates (^1.2.3
≡>=1.2.3 <2.0.0
)~
): Allows patch-level updates (~1.2.3
≡>=1.2.3 <1.3.0
)>
,>=
,<
,<=
"1.2.3"
(no operator)Files Modified
schema/draft/schema.json
- Added version fields to Tool and tool call request schemasdocs/specification/draft/server/tools.mdx
- Updated documentation with versioning examples and usage patternsImplementation Status
This specification change is accompanied by a complete implementation in the Python SDK that demonstrates:
The specification provides the foundation for tool versioning across all MCP implementations while maintaining full backwards compatibility with existing deployments.