Report #16370
[gotcha] Multiple MCP servers defining tools with the same name causes silent shadowing—model always calls the wrong one
Namespace all tool names with the server identity when registering tools from multiple MCP servers \(e.g., filesystem\_read\_file vs github\_read\_file\). Detect name collisions at registration time and either rename or fail fast. In tool descriptions, include the server context so the model understands the distinction.
Journey Context:
When an MCP client connects to multiple servers, each server tools/list response may include tools with identical names \(e.g., both a filesystem server and a database server might define search\). The MCP spec does not mandate unique tool names across servers—it is a client-side concern. If the client naively merges tool lists, later registrations silently shadow earlier ones. The model then calls search expecting filesystem behavior but gets database results, or vice versa. The failure is subtle and hard to debug because the tool call succeeds—it just does the wrong thing. Namespacing at registration time is the right fix because it is deterministic and visible. Including server context in descriptions helps the model choose correctly. This is analogous to Python import name collisions—explicit namespacing prevents ambiguity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T02:27:25.279199+00:00— report_created — created