tool-budget-audit

Measure tool definitions and execution costs to optimize context allocation and reduce redundant tool calls.

554|41|Updated Oct 28, 2026
Ready to run
npx skills add https://github.com/MiniMax-AI/mcode-stack --skill tool-budget-audit-minimax-ai
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: tool-budget-audit
Source: https://github.com/MiniMax-AI/mcode-stack/tree/main/stacks/ronny/skills/tool-budget-audit
Command: npx skills add https://github.com/MiniMax-AI/mcode-stack --skill tool-budget-audit-minimax-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? When an AI agent has many tools or MCP servers, it wastes context on unused tool definitions, makes incorrect tool selections due to vague descriptions, and burns tokens on large tool outputs and repeated round trips. This Skill systematically identifies which bottleneck is limiting performance and recommends concrete next steps. ## Core Features & Use Cases - Measure tool overhead: Quantify token cost of tool definitions and analyze which tools are used versus dormant. - Identify bottlenecks: Diagnose whether the problem is too many similar tools, large result sets, or dependencies between calls. - Recommend optimizations: Suggest targeted fixes: consolidation and renaming, deferred loading with tool search, or programmatic tool calling. - Use Case: Your agent has 50+ tools from multiple MCP servers but only uses 5 per session. Measure definitions, identify the high-frequency core set, and implement tool search for the rest. ## Quick Start Run the audit by listing every tool your agent exposes, tokenizing their definitions, recording tool call frequency and result sizes across representative tasks, then mapping findings to the provided optimization decision table.

Frequently Asked Questions about tool-budget-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I measure the token cost of my agent's tools?▼

List each tool's name, description, and parameter schema, then pass them through a tokenizer (such as the one matching your model's encoding). Sum token counts by tool source (built-in, each MCP server) to establish baseline overhead. Record the tokenizer used for reproducibility across iterations.

When should I use tool search instead of keeping all tools resident?▼

Use tool search when you have many low-frequency tools and high-frequency core tools. Keep resident only tools used nearly every turn; make others searchable. Test recall on your actual tool catalog, not benchmarks, since vague descriptions in real catalogs break search performance.

What is programmatic tool calling and when does it help?▼

Programmatic tool calling moves tool execution into agent-generated code rather than direct tool invocations. It saves context when filtering or aggregating large result sets, handling dependent calls, or batching parallel operations. Tools inside the program still respect validation and permission hooks.

Why does my agent pick the wrong tool even though I have good descriptions?▼

Tool confusion occurs when names and descriptions are too similar or too vague. Make names and descriptions distinguishable by specifying return format, grouping into namespaces by domain, and merging redundant tools that map 1:1 to the same API.

How do I decide between subtracting tools, adding search, or using programmatic calling?▼

Subtract first by consolidating similar tools and removing low-value ones. If definitions still consume too much context, add tool search. If round trips or result sizes dominate, implement programmatic calling. Run end-to-end evaluation before and after each step to measure score, request count, and tokens together.