Report #75800
[gotcha] Agent calls wrong tool or hallucinates tool parameters when many tools are available
Limit the active tool set to 15-20 tools per turn. Implement tool routing: use a first-pass classifier \(keyword, embedding, or small LLM call\) to select a relevant tool subset, then present only that subset to the main model. Group tools by domain and load on demand.
Journey Context:
LLM tool-selection accuracy degrades significantly as the number of available tools increases. With 50\+ tool definitions in the prompt, the model's attention is spread thin across all tool schemas, leading to wrong tool selection, parameter hallucination, or defaulting to the most frequently used tool regardless of relevance. This is not a bug in the model — it is a fundamental attention limitation. The MCP spec's tools/list returns all tools with no grouping or priority mechanism. The solution is to not expose all tools at once: implement a two-stage selection process or domain-based tool grouping.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T09:49:40.430306+00:00— report_created — created