Tool Budget Audit logo

Tool Budget Audit

Organization
MiniMax-AI
tool-budget-audit

Audit how much context an agent's tools consume, through tool definitions and tool results, and decide whether to trim the catalog, add tool search, or add programmatic tool calling. Use when an agent has many tools or MCP servers, picks the wrong tools, or burns context on tool output.

Overview

PublisherMiniMax-AI
Repositorymcode-stack
Skill nametool-budget-audit
Stars
464
Forks
36
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by MiniMax-AI on GitHub. Read the source before you install it.

Installation

Install the Tool Budget Audit AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/MiniMax-AI/mcode-stack/tree/main/stacks/ronny/skills/tool-budget-audit
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/MiniMax-AI/mcode-stack.git /tmp/mcode-stack
mkdir -p .claude/skills
cp -r /tmp/mcode-stack/stacks/ronny/skills/tool-budget-audit .claude/skills/tool-budget-audit
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Tool Budget Audit in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Tool Budget Audit on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Tool Budget Audit is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Tool Budget Audit

Tools cost context in two ways, plus one side effect:

  • Definitions. Every tool's name, description and parameter schema sits in context whether or not it is used this turn.
  • Intermediate results. Every call puts its full output back into the conversation, and every round trip is another full model request.
  • Side effect: wrong picks. Similar names and vague descriptions make the model choose the wrong tool or pass wrong arguments.

Tool search mainly saves the first cost. Programmatic tool calling (the model writes a small program that calls tools) mainly saves the second.

Companion to MCode Engineering Notes 02, "Too many tools will eat your context". Plain-text checklist: checklists/tool-budget.md.

1. Measure first

Work from the target project's code and real requests, not from guesses:

  1. List every tool exposed to the model, grouped by source (built-in, each MCP server, plugins).
  2. Estimate the token size of each tool definition with a tokenizer and sum it. Say which tokenizer you used; it is a relative measure.
  3. For one or two representative tasks, record how many tool calls were made, how many model requests that caused, and how large the tool results were.
  4. Note which tools are used almost every turn and which are rarely used.

Report the numbers you measured. If you cannot measure something, say so instead of estimating.

2. Step 0 - subtract

  • Merge by user intent. Do not map APIs one to one. "List issues", "filter issues by label" and "filter by author" can be one tool with parameters.
  • Make names and descriptions distinguishable. Two tools whose descriptions read alike will be confused. State the return format.
  • Group. Put tools into namespaces by domain, keeping each group small.
  • Decide what stays resident. Read, edit, search and run-command style tools used nearly every turn should always be loaded.

3. Step 1 - deferred loading and tool search

Consider it when there are many tools and most are rarely used.

  • Keep core high-frequency tools resident; make low-frequency tools searchable.
  • If a search miss means a tool "does not exist", check descriptions again: vague descriptions break recall.
  • Test tool search recall on your own tool set. Results on clean benchmarks do not transfer to messy real catalogs.
  • Tools whose catalog must be fetched over the network every turn can slow the first token. Consider keeping them resident instead.
  • When debugging, check what the model had actually seen at that moment, not just what the request listed.

4. Step 2 - programmatic tool calling

Consider it when there is a lot of data to filter or aggregate, three or more dependent calls, or batch operations that could run in parallel.

  • Actually move tools into the program. Offering a code tool next to all the normal tools tends to go unused.
  • Keep at top level: tools that interact with the user, change session state, need their result read before deciding the next step (tool search, loading a skill), browser and publishing tools, and spawning subagents.
  • Calls from inside the program must go through the same validation, hooks, permission prompts and UI as direct calls.
  • Tool failures should return an error result, not throw, so one failure does not discard the whole program.
  • Prefer structured tool output so the program can pick the fields it needs. A program that returns raw output saves nothing.
  • Search the codebase for logic keyed on tool names (reminders, counters, analytics). It silently stops firing once a tool moves into the program.

5. Decide

BottleneckFirst move
Too many or too similar toolsSubtract, merge, rename, group
Definitions take too much contextTool search
Results take too much context, too many round tripsProgrammatic tool calling
Arguments often wrongBetter descriptions and examples

The steps stack. A clean catalog makes tool search work; working tool search makes programmatic calling work. Run an end-to-end eval before and after each step and look at score, request count and tokens together (see harness-experiment).

Output

A short report: measured numbers, the main bottleneck, the recommended next step with concrete tool names, and what to measure afterwards.

Frequently asked questions

What does the Tool Budget Audit AI skill do?

Audit how much context an agent's tools consume, through tool definitions and tool results, and decide whether to trim the catalog, add tool search, or add programmatic tool calling. Use when an agent has many tools or MCP servers, picks the wrong tools, or burns context on tool output.

Why use Tool Budget Audit on TypingMind?

Because you install it once and use it with any model. Tool Budget Audit is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Tool Budget Audit in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/MiniMax-AI/mcode-stack/tree/main/stacks/ronny/skills/tool-budget-audit. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Tool Budget Audit?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Tool Budget Audit?

As many as you like. As long as a model supports skills, you can use Tool Budget Audit with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Tool Budget Audit AI skill free?

Yes. It is published on GitHub by MiniMax-AI under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇