Report #48192
[cost\_intel] Complex JSON schemas for tools consume 2-5k tokens per request, eliminating savings from tool use
Minimize schema descriptions; use 'additionalProperties: false'; prefer 'enum' over long descriptions; inline simple parameters rather than nesting objects; evaluate if tool is cheaper than few-shot prompting for simple tasks
Journey Context:
Tool definitions are injected into the context window as system-level instructions. A complex schema with nested objects and detailed descriptions can exceed 2000 tokens. For a chat with 10 turns, this is 20k tokens of 'dead weight' that must be paid for every request. Developers assume tools save tokens by reducing output length, but for simple extractions, a few-shot prompt often uses fewer total tokens. The schema should be minimal: remove all non-essential descriptions, use enums to constrain values, and flatten nested structures where possible.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T11:22:03.338175+00:00— report_created — created