Report #77412
[cost\_intel] When does Claude tool use XML overhead negate its cost advantage over raw prompting?
Avoid native tool calling for simple 1-field extraction; raw XML/JSON prompting cuts token count by 40% vs function calling XML wrappers.
Journey Context:
Anthropic tool use wraps parameters in XML \(...\{"key": "value"\}\). For a simple extraction \(email from text\), function calling adds ~200 tokens of overhead per request \(system \+ tool description \+ XML tags\). At $3/1M input tokens \(Sonnet\), 200 tokens = $0.0006 per call. At 10M calls/month, that's $6k of overhead vs raw prompting. Quality signature: raw prompting requires stricter regex validation; tool calling guarantees schema compliance but at token cost. Use tool calling when schema complexity >3 nested fields or when multi-turn agent memory is required; use raw prompting for single-turn ETL where output is flat.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:32:22.519016+00:00— report_created — created