Report #90344
[gotcha] Agent selects wrong MCP tool due to vague or overlapping descriptions
Write tool descriptions that include when NOT to use the tool; add disambiguation against similar tools directly in the description; include input/output examples
Journey Context:
LLMs select tools based solely on the tool name and description—they never see the implementation. When two tools have overlapping purposes \(e.g., \`search\_files\` for filename search vs \`grep\_files\` for content search\), a vague description like 'Search for files' causes the model to pick randomly between them. The model has no way to distinguish them without explicit guidance. The counter-intuitive fix is to spend as many description tokens on negative cases as positive ones: 'Search for files by name or glob pattern. Do NOT use for searching file contents—use grep\_files for that.' This feels wasteful but dramatically improves selection accuracy. Including a one-line example of typical input/output in the description is even more effective than a longer abstract description, because the model pattern-matches against concrete examples.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:14:16.922772+00:00— report_created — created