Skip to content

MCP audit

MCP tool definitions (schemas) included in a request add input whether used or not. Some clients defer schemas through virtual tool grouping, as described below. When all schemas are sent on each step of an agent loop, the cost multiplies:

tokens per task ≈ (tool schema tokens × steps) + accumulated conversation + tool responses

An idle server whose full schemas are loaded still costs tokens on each step; deferred schemas can change this baseline.

5 MCP servers
Tools 65%
Other 35%
100%
1 relevant server
Tools 15%
Other 35%
50%
Synthetic illustration, not a measured result: against the original prefix, tool definitions fall from 65% to 15%, while the other prefix stays at 35%; the new total is 50% of the original. Keeping one relevant server reduces the definitions sent on each turn; actual savings vary. Green indicates the pruned configuration, not a cache hit.
  1. List every MCP server and its tool count (the tools picker, Configure Tools, shows them).
  2. For each server, note how often you used it last month (Agent Debug Logs show tool calls).
  3. Decide per server:
UsageDecision
Used most daysKeep
Used occasionallyKeep disabled by default, enable per task
Rarely/never, or duplicated by another toolRemove
Large server where you need two toolsUse a narrower server or a small CLI the agent calls from the terminal
  1. Re-measure the first-request input size and the baseline task (Measure your usage).

On-demand tool loading and virtual grouping

Section titled “On-demand tool loading and virtual grouping”

Recent VS Code Copilot builds can group a large tool catalog into virtual tools and defer full schemas until a group is activated (a tool-search step such as tool_search, where supported). Once activated, the group’s schemas can remain in later requests for the session; behavior depends on the build and model. If grouping is disabled or unsupported, full schemas may be sent from the start. Check Agent Debug Logs and Cache Explorer rather than assuming a cache saving. The experimental github.copilot.chat.virtualTools.threshold controls when grouping is used (VS Code settings reference). Disabling unused MCP servers per workspace remains the most reliable baseline for reducing the available catalog.

Put MCP configuration in the repository (.vscode/mcp.json) so each project loads only what it needs: a backend repo does not need design-tool servers; a frontend repo does not need database-schema tools. Reviewing a per-repo file is also easier than a global list.

Repeated or large reference material (a house style, a runbook, API notes) can be packaged as an agent skill that loads on demand instead of sitting in always-on instructions. Benefits: less repeated input, one place to update, consistent results.

Tool results are often the largest part of the context (file reads, grep, shell output). Prefer targeted searches over reading whole files, and exclude noisy paths (Keep context lean).

Record the first-request input tokens in Agent Debug Logs before and after pruning, then run the same task and compare credits and success. Keep the change only if quality held.

A pruned tool the task needed leads to workarounds and extra steps. Keep a fast way to re-enable tools, and prune by evidence (usage), not by guesswork.

The talk deck this page draws on describes a team that reduced 187 tools to 52 and reports about a 72% drop in agent-task token use. We could not verify that case independently; use it as an example of the method, and measure your own result. TokenEconomizer automates the same idea by pruning tools that go unused across sessions (see the case study).

Ordered by venue tier, then citations. Findings are hypotheses to verify on your own workload; see the full list in Papers.