Report #92502
[cost\_intel] Function calling tool definitions inflating prompt tokens more than tool execution saves
Minimize tool schemas to required fields only, remove all 'description' fields on parameters unless critical for ambiguity, and prefer JSON mode over Function Calling for pure extraction tasks
Journey Context:
Every tool definition is embedded in the system prompt on every API call. A verbose tool schema with detailed descriptions and examples can consume 500-1000 tokens per call, even when the tool isn't invoked. Developers often auto-generate schemas from TypeScript with full JSDoc comments. For simple data extraction, Function Calling adds this overhead unnecessarily compared to JSON mode. The tradeoff is that JSON mode doesn't support parallel tool execution, but for extraction tasks, the cost difference is 2-3x. Aggressive schema minimization \(removing descriptions, using short property names\) is essential.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:51:25.627895+00:00— report_created — created