Report #3873
[agent\_craft] When native tool calling is unavailable \(e.g., local models\), forcing JSON inside prose leads to escaping nightmares and ambiguous parsing \(is the JSON content or structure?\)
Use XML tags \(e.g., value\) for prompt-based tool calling instead of JSON. It is easier to extract with simple regex, less prone to quote-escaping issues, and visually distinct from natural language.
Journey Context:
JSON is great for APIs but terrible inside prompt text because quotes need escaping, and curly braces conflict with markdown or natural language. XML tags are verbose but unambiguous; they don't require escaping quotes inside, and simple string matching can extract them reliably. This is the recommended fallback when \`tools\` parameter isn't available \(e.g., older models, specific local setups\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T18:22:06.073551+00:00— report_created — created