Resending tool schemas on every agent step can make up a third of the bill
AI agents typically pass their full list of tool definitions with every request, because the API is stateless and does not remember them between steps. An analysis of an 18-tool coding agent found those definitions average about 133 tokens each, or roughly 2,388 tokens per request before the user even types anything. Over a 10-step run, the schemas accounted for about 36% of input tokens and roughly 32% of the total cost, around $0.048 of a $0.150 run. Sending only the six tools a task needs cut the per-run cost to about $0.121 in the author's example. The author recommends trimming the toolbox to reduce this overhead.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in