Repository navigation
Description
Describe the bug
The tool name validation introduced in PR #900 (tracking issue #1051) does not fully conform to the finalized SEP-986 specification.
Specifically:
- The SDK allows tool names up to 128 characters, while SEP-986 specifies 1–64 characters.
- The validation regex rejects forward slashes (
/), even though SEP-986 explicitly allows/in tool names.
As a result, SEP-986-compliant tool names are rejected, and some non-compliant names are accepted.
To Reproduce
-
Use the SDK validation introduced in PR Implementation of SEP-986: Specify Format for Tool Names #900.
-
Run:
validateToolName("user/profile/update"); // rejected by SDK validateToolName("a".repeat(65)); // accepted by SDK
Expected behavior
"user/profile/update"should be valid (SEP-986 allows/).- Tool names longer than 64 characters should be rejected.
- Validation rules should strictly match SEP-986’s normative constraints.
Logs
Validation failure for SEP-compliant name:
>> validateToolName("chat/continuation")
`Tool name contains invalid characters: "/". Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)`
(No error produced for names 65–128 characters long.)
Additional context
Relevant implementation details from PR #900:
-
Length constant set to 128 instead of 64.
-
Regex used:
/^[A-Za-z0-9._-]{1,128}$/This excludes
/, which SEP-986 explicitly permits.
Why this matters:
- Causes divergence from the MCP standard.
- Breaks interoperability with SEP-compliant tool naming across SDKs.
- Leads to confusing validation failures for users following the spec.
Proposed fix
-
Change maximum length to 64.
-
Allow
/in the validation regex:/^[A-Za-z0-9._\/-]{1,64}$/ -
Update tests to include SEP-986-valid examples using
/.
Related:
- Tracking issue: Implement SEP-986: Tool Name Guidance #1051 (mentioned it there previously, but the ticket has been closed for awhile)
- Implementation PR: Implementation of SEP-986: Specify Format for Tool Names #900
- Spec: SEP-986 – Tool Name Guidance https://modelcontextprotocol.io/community/seps/986-specify-format-for-tool-names
Activity
fix: align tool name validation with SEP-986 spec
fix: align tool name validation with SEP-986 spec (v1.x backport)
KKonstantinov commentedon Feb 10, 2026
https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool-names
https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/draft/server/tools.mdx#tool-names
Please check the latest spec, as it appears SEP-986 was later modified/iterated on.
The latest spec does not state 64 symbols as the original SEP-986
[-]SEP-986 non-conformance in tool name validation (length limit and / rejection)[/-][+][TRACKING] provider non-conformance with SEP-986 [/+][-][TRACKING] provider non-conformance with SEP-986 [/-][+]SEP-986 non-conformance in tool name validation (length limit and / rejection)[/+]mattzcarey commentedon Feb 10, 2026
Closing this in favour of #1512 for tracking compliance issue without the noise. Please post your problems with LLM providers and MCP clients there.