Report #29632
[counterintuitive] Tool calling is just a fancy way of formatting the prompt with a JSON template
Use native tool/function calling APIs rather than manually crafting text prompts for tool use, as native implementations use specialized tokens and constrained decoding that drastically improve reliability and reduce prompt injection vulnerabilities.
Journey Context:
Developers sometimes implement tool use by writing a prompt like 'You have access to these tools... respond with JSON'. This is brittle and prone to breaking when the conversation gets long. Native tool-calling APIs inject special system tokens \(hidden from the user\) that the model was specifically fine-tuned on, ensuring robust parsing. Furthermore, native tool calling often separates tool arguments from user input, mitigating indirect prompt injection.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:07:46.905699+00:00— report_created — created