# How to track LLM cost by tool call > A tool that calls a model bills twice, and the second call usually lands on the tool rather than the request that triggered it. How to attribute both. URL: https://getculpa.com/track-llm-cost-by-tool-call Last reviewed: 2026-08-03 Rates effective: 2026-07-02 ## Answer To track LLM cost by tool call you record which tool a call belongs to, including the model calls tools make internally, then price and roll them up to the request that triggered them. Culpa, a local-first LLM cost, margin, and forecast ledger, prices each call and attributes it to the tool and the run, so nested spend lands where it was caused. ## Why this happens Tool calling doubles the number of places money leaves and most attribution only follows the first. The visible cost is the model deciding which tool to invoke, which is a small call carrying the tool schema. The hidden cost is what the tool then does, and if that tool summarises a document, reranks results or calls a sub-agent, it makes model calls of its own. Those calls are real spend and they usually get attributed to the tool as a standalone actor, or to nothing at all, rather than to the request that caused them. There's a second, quieter effect. Every tool definition sits in the input of every call that might use it, so tools you rarely invoke still bill on every request that carries their schema. A tool you added and forgot costs money for as long as it stays in the definition list. ## What this usually looks like - Your tool schemas grew and cost per request rose with them, on requests that used no tools. - A tool makes its own model calls and nothing connects them to the request that triggered it. - You can count tool invocations and can't price them. - Nobody can say which tool is the expensive one, only which is the popular one. - A deprecated tool is still in the definition list and still on every request. ## Common mistakes - Attributing only the tool-selection call. Why it hurts: The selection call is the cheap half. What the tool does next is usually the expensive half. Do instead: Attribute nested model calls to the tool AND roll them up to the triggering request. - Ignoring the cost of tool definitions on unrelated requests. Why it hurts: Schemas ride in the input of every call that could use them, whether or not anything is invoked. Do instead: Count the tokens your definition list adds and multiply by total requests, not tool uses. - Ranking tools by invocation count. Why it hurts: A rarely-used tool that summarises a long document can outspend a frequent trivial one. Do instead: Rank by priced cost, including everything the tool does downstream. - Leaving deprecated tools in the definition list. Why it hurts: They cost input tokens on every request forever, and nothing surfaces them because nothing calls them. Do instead: Audit the definition list against actual invocations and remove what never fires. ## Self-check - Count the tokens in your full tool definition list. - Multiply that by every request that carries it, including requests that invoke nothing. - Pick your most-invoked tool and add up the model calls it makes internally. - List every tool defined but never invoked in the last month. ## The tool schema tax, and the nested call behind it A modelled agent carries six tool definitions totalling 1,400 input tokens, on 2 million requests a month, of which 15% actually invoke the summarisation tool. That tool makes one model call of its own at 12,000 input and 600 output tokens. Priced on Claude Haiku 4.5 at real rates of $1.00 and $5.00 per million from the price book, effective 2026-07-02. Volumes are modelled. schema tax: 1,400 tokens x 2,000,000 requests = 2,800M input tokens = $2,800.00 invocations: 2,000,000 x 15% = 300,000 tool uses nested calls: 300,000 x (12,000 in + 600 out) = 3,600M input and 180M output nested cost: $3,600.00 + $900.00 = $4,500.00 total attributable to one tool = $2,800.00 + $4,500.00 = $7,300.00 The schema tax is charged on 2 million requests and the nested calls on 300,000, so the two halves scale on different denominators and neither appears on a tool-invocation dashboard. Attributing only the selection call would have reported a fraction of this. ## Cost figures Every figure carries its confidence and its source. No figure on this page is provider-reported. - $7,300.00 per month, modelled cost attributable to one tool, counting its schema tax and its nested model calls [calculated] Source: Arithmetic shown in full on this page. 1,400 schema tokens x 2,000,000 requests = $2,800.00, plus 300,000 invocations x (12,000 input and 600 output) = $3,600.00 + $900.00 = $4,500.00. Real Claude Haiku 4.5 rates of $1.00 and $5.00 per million from the price book effective 2026-07-02. Every volume, the schema size and the invocation rate are modelled. - $2,800.00 per month, the schema portion alone, charged on requests that invoke no tool at all [calculated] Source: 1,400 tool-definition tokens x 2,000,000 requests = 2,800,000,000 input tokens, at the real $1.00 per million input rate from the price book effective 2026-07-02. Reported separately because it scales on total requests rather than on invocations, which is why an invocation-count dashboard never shows it. ## FAQ Q: Do tool definitions cost money if the tool is never called? A: Yes. Tool schemas sit in the input of every call that could use them, so they bill on every request that carries the definition list, invoked or not. A modelled list of 1,400 tokens across 2 million requests is $2,800.00 a month at a $1.00 per million input rate. Q: How do I attribute the model calls a tool makes internally? A: Carry the run identifier and a tool identifier into the tool's own calls, then roll them up two ways: to the tool, so you can rank tools by real cost, and to the triggering request, so a run total includes everything it caused. Q: Which tools are usually the expensive ones? A: Not the most invoked. Tools that summarise long documents, rerank retrieval results or delegate to a sub-agent make large model calls of their own, so a tool used on 15% of requests can outspend one used on all of them. Q: How do I find tools that cost money and do nothing? A: Compare your tool definition list against actual invocations over a month. Anything defined and never invoked is pure schema tax, charged on every request that carried it, and nothing will surface it because nothing calls it. ## Sources - Anthropic pricing: https://platform.claude.com/docs/en/docs/about-claude/pricing Run the free Cost Leak Scan: https://app.getculpa.com/scan?source=pseo&slug=track-llm-cost-by-tool-call&cluster=attribution Machine-readable index of every guide: https://getculpa.com/api/pages Human-readable index of every guide: https://getculpa.com/guides Site overview: https://app.getculpa.com/llms.txt Privacy: Culpa runs on your infrastructure. Your prompts and responses never leave it. Culpa counts calls to run your plan, and it fails open, so if it ever breaks your app keeps running.