Skip to main content
Glama

FreeToolHub

compress_tool_definitions

Shrink MCP tool descriptions and JSON schemas to cut context cost without changing how agents call them. Returns the compressed definitions plus exact token savings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
definitionsYesJSON array of tool definitions to compress. Each item: {name, description, inputSchema}. Accepts a JSON array, or a JSON string containing one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / definitions / description
      Previous value: -"JSON array of tool definitions to compress. Each item: {name, description, inputSchema}."New value: +"JSON array of tool definitions to compress. Each item: {name, description, inputSchema}. Accepts a JSON array, or a JSON string containing one."
    • changedInput schema / properties / definitions / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "array",
      +  "object"
      +]
  2. First observed

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral burden. It discloses a critical guarantee—'without changing how agents call them'—and states the return value ('compressed definitions plus exact token savings'). It does not detail error behavior or exact output formatting, but core side effects are transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no fluff: purpose first, result second. Every phrase earns its place and the description is easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter, pure transformation tool with no output schema, the description covers what it does, why, and what it returns. The main gap is the unspecified exact structure of the compressed output and token savings, but it is sufficient for an agent to invoke and use the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The tool description adds context about compressing MCP definitions but no additional parameter-level meaning beyond the schema's clear description of 'definitions'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action ('Shrink'), a resource ('MCP tool descriptions and JSON schemas'), and a goal ('cut context cost'). It is clearly distinct from calculation/estimation siblings, but it does not explicitly differentiate itself from related tools like estimate_mcp_context_budget.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear context for when to use the tool: when you want to reduce context cost of tool definitions. It does not mention exclusions or alternatives, but the purpose is specific enough that an agent can determine appropriate use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources