shrink-mcp-tool-docs

Compress MCP tool docstrings to the last eval-safe state.

12|3|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/devemberx/mcp-server-polarion --skill shrink-mcp-tool-docs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shrink-mcp-tool-docs
Source: https://github.com/devemberx/mcp-server-polarion/tree/main/.claude/skills/shrink-mcp-tool-docs
Command: npx skills add https://github.com/devemberx/mcp-server-polarion --skill shrink-mcp-tool-docs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps you reduce the token and character cost of MCP tool descriptions that are sent to client LLMs, without degrading tool selection or behavior. It is designed for situations where docstrings and parameter descriptions have become too verbose and you need to compress them safely to the last known passing state.

Core Features & Use Cases

  • Eval-guided compression loop: Shrinks MCP tool docstrings and optional parameter descriptions through a disciplined compress, eval, confirm, and rollback workflow.
  • Failure-boundary optimization: Pushes descriptions toward the shortest viable form, then keeps only the last green version before regressions appear.
  • Schema-aware targeting: Distinguishes between whole-tool descriptions and Field description text so edits focus only on text that actually ships to the LLM.
  • Use Case: Use this Skill when maintaining an MCP server with many tools and you want to lower prompt overhead while preserving tool-routing accuracy, safety behavior, and transport-test compatibility.

Quick Start

Ask the assistant to use the shrink-mcp-tool-docs skill to compress MCP tool docstrings to the last eval-safe boundary and report baseline, iterations, and final savings.

Frequently Asked Questions about shrink-mcp-tool-docs

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

FAQPage Schema
How do I reduce token cost of MCP tool descriptions without breaking tool routing?

To reduce MCP tool description tokens, shrink docstrings and parameter descriptions iteratively while running eval gates after each edit, rolling back to the last passing state if tool selection or behavior degrades.

What does eval-driven optimization for MCP docstring compression actually do?

Eval-driven MCP docstring compression pushes tool descriptions toward the shortest viable form while running eval gates, keeping only the last green version before regressions appear so token reduction does not degrade tool selection or safety behavior.

Can I compress FastMCP parameter descriptions without losing schema constraints?

Yes, schema-aware compression targets only LLM-facing text while preserving non-empty descriptions, format constraints, and runtime tool pointers, so schema metadata and parameter validation remain intact.

What's the best way to shrink MCP server tool text when docstrings have become too verbose?

Use a disciplined compress, eval, confirm, and rollback workflow that applies incremental edits to docstrings and parameter descriptions, lowering prompt overhead while preserving tool-routing accuracy and transport-test compatibility.

Does shrink-mcp-tool-docs work with MCP servers that expose tools through schema metadata only?

It applies to MCP servers exposing tools through docstrings and schema metadata, using schema inspection to distinguish whole-tool descriptions from Field description text so edits target only text that ships to the LLM.

When should I not use automated docstring compression for MCP tools?

Avoid automated docstring compression when you lack eval gates or snapshot rollback, because without eval-driven validation, shrinking descriptions risks degrading tool selection accuracy, safety behavior, and transport-test compatibility with no safe recovery path.