Report #22393
[agent\_craft] Agent confuses tool boundaries when 10\+ tools are available, hallucinates parameter names
Group tools by 'capability domain' \(e.g., Filesystem, Database, Web\) in the system prompt with XML section headers. List each tool with its JSON schema inside blocks, but describe the 'why/when' above the schema.
Journey Context:
Dumping all tool schemas into a list overwhelms the model, especially when tools have similar names \(e.g., 'read\_file' vs 'read\_document'\). Grouping by domain helps the model route to the correct semantic category first, then select the tool. The XML structure creates clear token boundaries between tool definitions. Crucially, adding 'when to use this' \(description\) before the schema primes the model for correct invocation better than raw JSON schema alone. This shifts the cognitive load from pattern matching \(raw schema\) to intent matching \(description\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T15:59:57.631342+00:00— report_created — created