Skip to content

[BUG] MCP tool names with hyphens fail when using native tool calling #10766

@hori-so

Description

@hori-so

Problem (one or two sentences)

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

  1. Configure an MCP server that exposes a tool name containing hyphens (e.g., abcdefghij-kl-mnop-qrs-tuv--wxyz-abcd-efghijk-lmno).
  2. Use Roo Code v3.40.0 or later with native tool calling.
  3. Run a prompt that should invoke the MCP tool.
  4. Claude outputs a malformed tool name such as:
    mcp--abcdefghij___kl___mnop___qrs___tuv--wxyz___abcd___efghijk__
  5. Roo Code then reports that the tool does not exist.

Expected result

[Tool Use: mcp--abcdefghij-kl-mnop-qrs-tuv--wxyz-abcd-efghijk-lmno]

Actual result

[Tool Use: mcp--abcdefghij___kl___mnop___qrs___tuv--wxyz___abcd___efghijk__]

Variations tried (optional)

No response

App Version

v3.41.0 (regression occurs starting from v3.40.0; v3.39.3 works correctly)

API Provider (optional)

Amazon Bedrock

Model Used (optional)

anthropic.claude-sonnet-4-5-20250929-v1:0

Roo Code Task Links (optional)

No response

Relevant logs or errors (optional)

Date/time: 2026-01-16T01:21:05.506Z
Extension version: 3.41.0
Provider: bedrock
Model: anthropic.claude-sonnet-4-5-20250929-v1:0

ツール 'wxyz-abcd-efghijk__' はサーバー 'abcdefghij-kl-mnop-qrs-tuv' に存在しません。利用可能なツール: wxyz-abcd-efghijk-lmno

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions