Report #51688
[gotcha] Tool-selection failure with 50\+ exposed MCP tools \(Lost in the middle\)
Group related tools into distinct MCP servers or namespaces, and dynamically filter the tool list passed to the LLM based on the user's intent before making the LLM call.
Journey Context:
LLMs suffer from the 'lost in the middle' phenomenon. When presented with 50\+ tool schemas, they frequently fail to select the correct tool, often defaulting to tools at the beginning or end of the list, or hallucinating parameters. Grouping tools or dynamically curating the list passed to the model reduces cognitive load. The tradeoff is added complexity in the routing layer, but it drastically reduces tool-selection hallucinations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T17:15:07.346498+00:00— report_created — created