🗜️
Tools/MCP Tool Description Compressor

MCP Tool Description Compressor

Shrink MCP tool descriptions and JSON schemas to cut context cost — without changing how agents call them.

TOKEN SAVINGS
La calculadoraPage 1
Each item: {name, description, inputSchema}
Tokens before
330
Tokens after
130
Reduction
60.6%
🗜️ 2 tool definitions compressed: 330130 tokens, saving 200 (60.6%). Enum values and required lists were left untouched, so call semantics are unchanged.
ToolTokens beforeTokens afterSavedReductionDescription chars
search_customers1866612064.5%32276
refund_order144648055.6%21234
TOKEN MODEL: description at 4.0 chars/token · schema at 3.6 chars/token
Compressed definitions — ready to paste
[
  {
    "name": "search_customers",
    "description": "allows you to search through the customer database to find matching records.",
    "inputSchema": {
      "type": "object",
      "required": [
        "query"
      ],
      "properties": {
        "query": {
          "type": "string"
        },
        "limit": {
          "type": "number"
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "churned",
            "trial"
          ]
        }
      }
    }
  },
  {
    "name": "refund_order",
    "description": "issues a refund for a given order.",
    "inputSchema": {
      "type": "object",
      "required": [
        "orderId"
      ],
      "properties": {
        "orderId": {
          "type": "string"
        },
        "amount": {
          "type": "number"
        },
        "reason": {
          "type": "string",
          "enum": [
            "duplicate",
            "fraudulent",
            "requested_by_customer"
          ]
        }
      }
    }
  }
]
Descriptions are reduced to their first sentence; property-level defaults, examples and descriptions over 60 characters are dropped. Enum values and required lists are always preserved — call semantics do not change. Atlassian’s mcp-compressor reports 70–97% description-overhead reduction without changing how agents call tools; a typical safe reduction is 40–70%. Re-test your agent after swapping in the compressed definitions.
Data Source & Legal Disclaimer
Effective: Token model: description at 4.0 chars/token, schema at 3.6 chars/token
Sources: Compression model mirrors the FreeToolHub MCP tool compress_tool_definitions

Token counts are estimates from a character-based model, not measured tokenizer output. Always re-test your agent after compressing: this tool preserves enum values and required lists, but a description you trimmed to one sentence may have carried nuance your model relied on to choose correctly.

See all data sources & update policy →
Cómo funcionaPage 2

Most of your context budget is being spent on prose nobody reads

Tool descriptions are written for humans browsing a README, then loaded verbatim into every single request. The waste is remarkably consistent: hedging(“This tool allows you to…”), restatement (a sentence explaining what the function name already says), examples in prose, and schema decorationdefault, examples and paragraph-long property descriptions that the model rarely needs to select a tool. None of it changes how the tool is called, and all of it is re-sent on every turn. The key safety property here: enum values and required lists are never touched. Those define the call contract, so stripping them would break invocation rather than merely shorten it. What gets cut is prose and decoration — which is why a typical safe reduction lands in the 40–70% range without a behaviour change.

What survives compression, and what is dropped
BEFOREtype: objectrequired: ["query"]query.description (74 chars)limit.default = 25limit.examples = [10,25,50]description: 4 sentences"This tool allows you to…""(e.g. \"john\" matching…)"AFTER✓ type: object✓ required: ["query"]✗ query.description — dropped (>60)✗ limit.default — dropped✗ limit.examples — dropped✓ description: first sentence only✗ "This tool allows you to…" — stripped✓ enum: ["active","churned","trial"]

Type information, enums and required lists define how the model calls your tool, so they are always preserved. Descriptions, defaults, examples and long property text only help a human reader, so they are reduced or removed.

Two realistic tools, one pass

A server exposes search_customers and refund_order. Both descriptions were written for a README: they hedge, restate the function name, and inline examples. Both schemas carry defaults and paragraph-length property text.

  1. Descriptions:Hedging stripped, examples removed, each cut to its first sentence — the operative instruction survives
  2. Schemas:default and examples dropped; property descriptions over 60 chars dropped
  3. Preserved:type, required, per-property type and every enum — the call contract is byte-identical
  4. Result:Roughly half the tokens, and the agent calls the tools the same way
Joke of the Day
Sep 15

Why did the cow cross the road?

Free core, forever

Keep the Free Edition Free

No signups, no data sold. The core of every tool is free forever — the optional Pro plan adds batch processing, unlimited downloads, white-label exports and an ad-free experience.

Support me on Ko-fi— keep tools free

100% of proceeds go towards hosting & building more free tools.