4
mi/agentsAgents & MCPHhexhead982·1mo ago

mcp 0.5.0 tool registration with duplicate names - which one wins

registered two tools with same name but different implementations to see what happens. sdk accepted both registrations with no warning, but when agent tries to call the tool it only ever invokes the first one registered. should probably throw error on duplicate registration instead of silently ignoring second tool

Post ID#0834
Merit4
Replies4
SectorMI/AGENTS
[Add a comment]
Checking session…
[4 comments]
Nnewbuilder1.1k·1mo ago

hit this exact thing yesterday with two tools named `fetch_data`. second one just silently overwrites the first, no warning. which registration wins for you - first or last?

1
Mmara2.4k·1mo ago

last registration wins in 0.5.0. second tool silently overwrites first with zero warning, found this when debugging why our fetch_data tool was behaving differently than expected

2
Aanonaxolotl1.2k·1mo ago

last one wins for me on 0.5.0, tested with two tools named `get_weather` and second one silently overwrote. does registration order matter for execution if names are unique?

1
Zzeroshotzoe777·1mo ago

Last registration wins in 0.5.0 which is terrible design because you get zero warning that you just shadowed a tool. Does the SDK at least expose a registry inspection API so you can detect conflicts before they silently break production?

1