# The Tool-Schema Token Tax
<!--
ref: @knowledge/facts/tool-schema-token-tax
type: fact
tags: [AI agents, token optimization, tool selection, performance, cost analysis]
triggers: [high token usage, incorrect tool selection, tool manifest evaluation, performance issues]
trigger_prompt: When you're assessing the efficiency of your AI agent's tool usage and want to understand the impact of tool schemas on token consumption.
version: 2
updated_at: 2026-10-18T05:41:55.716Z
-->

Every tool your agent exposes costs roughly 170–200 tokens on every single call — used or not. Nothing in a typical build surfaces that number, so most teams ship a multi-thousand-token tool manifest on every turn without ever having decided to.

*Synthesized from Elizabeth Fuentes Leon, "Stop AI Agent Hallucinations: 5 Techniques + Production Patterns" (AI Engineer).*

Elizabeth Fuentes Leon, a developer advocate at AWS, measured this against a travel agent built on the Strands framework, exposing 29 tools. When you decorate a function as a tool, its name, description, docstring, and typed parameters are compiled into a schema that is injected into the context window on *every* invocation — before the user's message, before any response. Each schema runs about 170–200 tokens depending on parameter count. Her 29-tool agent therefore paid thousands of tokens per call purely to describe tools it mostly wasn't going to use.

*Figure note:* treat 170–200 tokens/tool as the reusable unit rate and measure your own manifest rather than deriving it. The per-tool rate and the demo's reported per-call total do not reconcile cleanly (170–200 × 29 implies ~5,000 tokens, not the ~3,000 figure cited in passing), which is itself the point — nobody, including the people who build these agents, has the number in front of them. Read the input token count off your agent with a full tool list, then again with an empty one. The delta is the tax.

Two consequences worth holding onto:

**The cost is silent.** Nothing in a typical agent build surfaces it. It is invisible until you read the input token count directly and do the multiplication yourself. Many teams reason carefully about prompt length while quietly shipping a tool manifest that dwarfs the prompt on every turn.

**The cost isn't only money.** Fuentes Leon found that with all 29 tools visible, the model would sometimes select the wrong one — several were near-duplicates, and a crowded tool list is a crowded decision. Filtering to the top three semantically relevant tools per query cut tool-description tokens by roughly an order of magnitude *and* improved selection accuracy. Fewer options is not a compromise here; it is the better answer on both axes.

The takeaway for anyone shipping an agent: count your tools, measure what their schemas actually cost you per call, and decide whether you meant to pay that every single turn.

---

*Related: `@knowledge/protocols/agent-to-human-handoff-context-preload` · `@content/youtube/david-ondrej/fine-tune-the-biggest-open-source-models-even-with-a-bad-pc` · `@content/youtube/david-ondrej/tailscale-clearly-explained-beginners-guide` · `@content/youtube/nate-herk/how-claude-is-creating-a-new-generation-of-millionaires` · `@content/youtube/eo-global/the-problem-with-ai-agents-no-one-is-talking-about-yutori-abhishek-das`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*