Skip to content

v0.9.4: MCP qualified tool names with hyphens/dots are un-callable (sanitized round-trip breaks) #5158

Description

@Hmbown

Summary: MCP qualified-name round-trip is lossy for punctuated tool names: qualify_tool_name sanitizes the tool segment (my-toolmy_tool, crates/mcp/src/lib.rs:489-515) and parse_qualified_tool_name does not de-sanitize (517-533). The exact-match fast path (369-373) then sends the sanitized name to the server — which has no tool called my_tool — and returns early, so the working scan path (which would use the real name) never runs.

When hit: any MCP server exposing tools with hyphens, dots, or spaces in their names (common: fetch-json, git.get-commit, etc.) — those tools are un-callable by qualified name whenever the server name round-trips cleanly.

Impact: tools silently unusable; the model sees them in the listing but every call fails with "tool not found".

Repro: register server with tool do-thing; call_qualified_tool("mcp__srv__do_thing") → server error; scan path would match but is never reached.

Found in a read-only v0.9.4 bug hunt (2026-08-02).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions