You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 15, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on May 15, 2026. It is now read-only.
[BUG] MCP tool names with hyphens fail when using native tool calling #10766
MCP tools with hyphens in their names fail to execute when using native tool calling.
This regression occurs starting from Roo Code v3.40.0 (v3.39.3 works correctly).
Context (who is affected and when)
This affects users whose MCP servers use tools with hyphenated names.
In my case, a tool originally named mcp--abcdefghij-kl-mnop-qrs-tuv--wxyz-abcd-efghijk-lmno is transformed into mcp--abcdefghij___kl___mnop___qrs___tuv--wxyz___abcd___efghijk__, resulting in Roo Code being unable to resolve the tool.
(Note: The tool name has been masked for confidentiality.)
Reproduction steps
Configure an MCP server that exposes a tool name containing hyphens (e.g., abcdefghij-kl-mnop-qrs-tuv--wxyz-abcd-efghijk-lmno).
Use Roo Code v3.40.0 or later with native tool calling.
Run a prompt that should invoke the MCP tool.
Claude outputs a malformed tool name such as:
mcp--abcdefghij___kl___mnop___qrs___tuv--wxyz___abcd___efghijk__
Roo Code then reports that the tool does not exist.
Never faced that issue yet, but like roomote I guess this is essentially caused by the fact that the tool name is already long, and the encoding makes it a bit longer, and it happens to leaves two underscores at the end.
I did not know there was a 64 characters limit for tool names, is that a hard limit?
Tool names SHOULD be between 1 and 128 characters in length (inclusive).
Also:
The following SHOULD be the only allowed characters: uppercase and lowercase ASCII letters (A-Z, a-z), digits (0-9), underscore (_), hyphen (-), and dot (.)
So having to encode hyphens should not be required in the first place, but I guess not all models respect the spec...
Activity
mrubens commentedon Jan 16, 2026
@pdecat do you have any ideas on this one? Could it be related to #10644? Thank you!
pdecat commentedon Jan 16, 2026
Never faced that issue yet, but like roomote I guess this is essentially caused by the fact that the tool name is already long, and the encoding makes it a bit longer, and it happens to leaves two underscores at the end.
I did not know there was a 64 characters limit for tool names, is that a hard limit?
pdecat commentedon Jan 16, 2026
According to https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool-names :
Also:
So having to encode hyphens should not be required in the first place, but I guess not all models respect the spec...
pdecat commentedon Jan 16, 2026
@roomote Maybe we could hash the end of tool names instead of truncating them and thus loose information.
fix: use hash suffix instead of truncation for long MCP tool names
feat: replace hyphen encoding with fuzzy matching for MCP tool names