AI Tokenomics in a Minute
Tool Calls
How agent tool use (read, search, shell, tests) drives tokens, latency, and cost beyond the model completion itself.
In one sentence
A tool call is a model-requested action—file read, search, shell, test run, or API—whose results usually re-enter the context and therefore add tokens, time, and often billed usage.
Why it matters
Coding agents spend much of their budget on tools, not on clever prose. Teams that only watch completion tokens miss why a “simple” task got expensive.
How it works
- Count tool calls per task: reads, greps, edits, test runs, and browser or API actions.
- Measure how much tool output is written back into context; large logs dominate cost.
- Prefer targeted reads over dumping whole files or CI logs when a short excerpt answers the question.
- Treat failed tool loops as spend: the same failing command re-run with full output is costly thrash.
- Attribute tool-driven tokens to the engineering outcome when calculating cost per task or accepted change.
Example
An agent debugs a flaky test by re-running the suite five times and pasting full XML reports into chat. Most of the bill is tool output in context, not the final three-line patch.
What this proves
Tool traces prove which actions ran, how often, and how much output re-entered the session—when the product logs them.
What this does not prove
More tool calls do not prove deeper understanding. Fewer tool calls do not prove the agent found the right evidence.
Last reviewed 2026-09-09. Title for citation: AI Tokenomics in a Minute: Tool Calls.