Yeda AI Tips · #180

Español

Prune Your MCP Servers: Every Tool Schema Is Always-On Cost

Adding tools can make your AI agent worse.

It feels like a free upgrade: connect another Model Context Protocol (MCP) server, and now the agent can do more. But every tool you expose has a standing cost. Its schema — name, description, and full parameter definition — is injected into the context on every single turn, and the pile of choices makes the agent worse at picking the right one. More capability on paper, less reliability in practice.

Two costs, not one

People notice the token cost and stop there. There are two:

So the failure isn't just "context is full." It's "the agent reaches for the wrong thing."

Expose only what the task needs

The fix is curation. For a given workflow, expose the small set of tools that workflow actually uses and turn the rest off.

// Before: everything on, always
{ "mcpServers": { "github": {}, "postgres": {}, "slack": {}, "jira": {},
                  "filesystem": {}, "git": {}, "fetch": {}, "sentry": {} } }

// After: only what this project's tasks need; the shell covers git + files
{ "mcpServers": { "postgres": {}, "sentry": {} } }

The payoff

Fewer tools means a leaner context and a sharper agent. With a handful of relevant, distinct tools, selection accuracy climbs: the model reaches for the right one far more often, and you've spent your token budget on the task instead of on a menu the agent barely uses.

Power moves

Resources

Shipping AI or cloud systems? Yeda AI audits and hardens production LLM and cloud pipelines. Talk to us · Read the blog