fix: align tool name validation with SEP-986 spec (v1.x backport)#1506
Closed
corvid-agent wants to merge 1 commit intomodelcontextprotocol:v1.xfrom
Closed
fix: align tool name validation with SEP-986 spec (v1.x backport)#1506corvid-agent wants to merge 1 commit intomodelcontextprotocol:v1.xfrom
corvid-agent wants to merge 1 commit intomodelcontextprotocol:v1.xfrom
Conversation
Fixes modelcontextprotocol#1502 Backport of modelcontextprotocol#1505 to v1.x branch: - Allow forward slash (/) in tool names per SEP-986 - Reduce max length from 128 to 64 per SEP-986 - Add warning for names starting/ending with / - Update tests to match new validation rules Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
6 tasks
commit: |
mattzcarey
approved these changes
Feb 10, 2026
mattzcarey
requested changes
Feb 10, 2026
Contributor
mattzcarey
left a comment
There was a problem hiding this comment.
blocking. SEP was changed before it landed
Contributor
|
closing as with #1505 |
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.
Summary
Backport of #1505 to v1.x branch, as requested by @mattzcarey.
Fixes #1502
The tool name validation was not conforming to the SEP-986 specification in two ways:
/as an invalid character, but SEP-986 explicitly allows it (useful for namespaced tool names likeuser/profile/update)Changes
TOOL_NAME_REGEXfrom/^[A-Za-z0-9._-]{1,128}$/to/^[A-Za-z0-9._/-]{1,64}$//to the valid character set in the invalid character filter/(consistent with existing warnings for leading/trailing-and.)Test plan
/(e.g.,user/profile/update) are accepted as valid/produce a warning but are still valid🤖 Generated with Claude Code