Report #50022
[cost\_intel] How tool calling JSON schemas silently 3x token usage in multi-step agent loops?
Tool definitions consume tokens on every turn \(system prompt bloat\); reduce schema size by 50% using 'omit descriptions for obvious fields' and 'flatten nested objects' to save 30-40% on long conversations.
Journey Context:
Developers define rich JSON schemas for tool calling without realizing the entire schema \(not just the call\) is injected into the context every turn. A schema with 10 tools each having 5 fields with descriptions can consume 2k tokens per turn. In a 20-turn agent loop, that's 40k tokens just for schema overhead. The cost at $3/1M tokens is $0.12 per conversation, but at scale \(100k convos\) that's $12k wasted on schema bloat. The mistake is using auto-generated schemas from Pydantic models that include 'title' and 'description' for every field. The fix: strip descriptions from self-evident fields \(e.g., 'query: string' needs no description\), use 'additionalProperties: false' to reduce schema verbosity, and offload complex validation to the client side rather than describing it in the schema.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T14:26:42.336363+00:00— report_created — created