Report #12068
[agent\_craft] Tool definitions in system prompts produce unreliable tool calls or hallucinated parameters
Use XML tag formatting \(e.g., ......\) in the system prompt instead of JSON Schema descriptions when using Claude models; define each tool as an XML block with explicit parameter tags
Journey Context:
JSON schemas embedded in text confuse the model's attention mechanisms; XML aligns with the model's training on HTML-like structures and creates clearer hierarchical boundaries. Anthropic's native tool use implementation uses XML under the hood, and manual XML formatting in prompts achieves similar reliability for custom implementations without native tool support.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T14:56:19.743001+00:00— report_created — created