Report #81770
[cost\_intel] Tool definitions consuming more tokens than the tool execution saves
Compress tool schemas by removing descriptions from nested properties, stripping 'title' fields, and moving long documentation to a pre-amble in the system prompt. Use 'additionalProperties: false' to reduce tokenization overhead and limit schema depth to 2 levels.
Journey Context:
Developers assume verbose JSON schemas help the model use tools correctly, but each field description and nested object definition consumes tokens on every API call, regardless of whether the tool is invoked. A complex SQL query builder schema with 20\+ fields can consume 3-4k tokens per request. If the tool is only called 10% of the time, you're burning 90% of those tokens unnecessarily. Few-shot examples in the system prompt often use fewer tokens and improve reliability more than verbose schemas. The alternative of dynamic schema generation adds latency but saves tokens for unused tools.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T19:51:03.384423+00:00— report_created — created