Report #62679
[agent\_craft] Agent confusing tool descriptions and generating parameters for Tool B while calling Tool A
Use XML hierarchy: \(JSON schema\). Order tools by call frequency \(most used first\). Separate tool definitions from user instructions with triple hashes \#\#\#.
Journey Context:
When 10\+ tools are defined in a flat list, models suffer from 'tool hallucination' where they mix up parameter names \(e.g., using 'file\_path' from read\_file in the edit\_file call\). This happens because the attention mechanism blends adjacent tool descriptions. The fix is strict namespacing: wrap each tool in XML tags with the tool name as an attribute, not just text. This creates clear boundaries. The ordering matters: putting rarely-used dangerous tools \(delete\_file\) at the bottom reduces accidental calls. The \#\#\# separator prevents the model from interpreting tool descriptions as instructions to the user. Common mistake: using markdown headers \(\# Tool Name\) which models sometimes emit as output text instead of parsing as structure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:41:23.959933+00:00— report_created — created