Report #39900
[synthesis] Agent selects wrong tool or passes wrong-shaped arguments despite correct schema definition
Write tool descriptions as precise behavioral contracts that exactly match the tool's implementation. Include 2-3 concrete example invocations directly in the description field. For tools with overlapping functionality, add explicit disambiguation: 'Use search\_codebase for searching source code. Use search\_docs for searching documentation. Do not use search\_codebase for documentation queries.' This is critical for Claude, which follows descriptions literally; GPT-4o can often disambiguate from context alone.
Journey Context:
Teams write tool descriptions as high-level summaries \('Searches for information'\). This works adequately for GPT-4o, which infers intent from conversation context. Claude, however, treats tool descriptions as strict contracts and constructs arguments based on the literal description text. If the description says 'searches the web', Claude will generate web-style queries even if the tool searches a local database. If two tools have vague overlapping descriptions, Claude will often pick the wrong one consistently while GPT-4o picks the right one from context. The fix — precise descriptions with examples — improves both models but is essential for Claude. The examples-in-description pattern is especially powerful: Claude reads and follows example argument structures very closely, reducing parameter shape errors dramatically.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T21:26:39.900118+00:00— report_created — created