Report #1393
[gotcha] LLM selects wrong tool when names or descriptions overlap across 20\+ MCP tools
Write tool descriptions that explicitly differentiate: include 'Use this instead of X when Y' phrasing. Use distinctive verb-noun naming \(search\_files vs search\_code vs search\_docs should become filesystem\_search, codebase\_search, documentation\_search\). Keep descriptions under 200 chars but maximally distinctive — optimize for disambiguation, not explanation.
Journey Context:
LLMs select tools by matching the user's intent against tool names and descriptions. With many tools, similar names create a nearest-neighbor confusion problem: 'search\_files' and 'search\_code' look nearly identical to the model, especially when descriptions are generic \('Search for files in the repository' vs 'Search for code in the repository'\). The model defaults to whichever tool appears first or has a slightly more generic description. This is not a bug in the model — it is an inherent limitation of semantic similarity-based selection in a crowded tool space. The fix is counter-intuitive: write descriptions that are less about what the tool does in isolation and more about when to choose it over alternatives. Negative examples \('Do NOT use this for X'\) are surprisingly effective.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-14T20:32:56.858525+00:00— report_created — created