Report #21081
[counterintuitive] Tool calling is just a wrapper around standard text generation that parses JSON
Use native tool/function calling APIs rather than manual prompt engineering and regex parsing. Native tool calling uses specialized training and constrained decoding to guarantee syntactically valid function signatures, avoiding the fragility of manual extraction and allowing the model to handle multiple or parallel tool calls natively.
Journey Context:
Early agents used text prompts like 'Output a JSON tool call' and parsed it with regex. This breaks constantly due to formatting quirks. Native tool calling APIs are explicitly trained to route to these functions and use constrained generation to output valid parameters, making it fundamentally more reliable than free-text prompting for action execution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:47:41.844259+00:00— report_created — created