Skip to content

chore(mcp): audit and optimize tool descriptions for token efficiency #784

@joshrotenberg

Description

@joshrotenberg

Summary

Audit all 244 tool descriptions for redundancy, verbosity, and token efficiency. Optimize descriptions to reduce context window consumption without losing tool selection accuracy.

Motivation

Every tool description is included in tools/list responses and injected into the LLM's context window. With 244 tools, even small per-tool savings compound significantly. Research (SEP-1576) found 60-65% schema field duplication in the GitHub MCP server. Poor or verbose descriptions also hurt tool selection accuracy.

Audit checklist

  • Redundant phrasing: remove boilerplate like "This tool allows you to..." -- just state what it does
  • Duplicate parameter descriptions: identify parameters repeated across many tools (e.g., profile, subscription_id) and ensure descriptions are minimal but sufficient
  • Description length: target concise descriptions that distinguish tools from each other without unnecessary detail
  • Naming clarity: ensure tool names are self-descriptive enough that shorter descriptions suffice
  • Parameter schema overlap: document which parameters are shared across tools (future $ref deduplication if MCP spec supports it via SEP-1576)

Approach

  1. Extract all tool descriptions and parameter schemas (can use tools/list output or code inspection)
  2. Measure total token count of current tools/list response per toolset
  3. Identify worst offenders (longest descriptions, most duplicated schemas)
  4. Rewrite descriptions for conciseness
  5. Measure token count after optimization
  6. Verify tool selection accuracy is maintained (manual testing with representative queries)

Non-goals

  • Not changing tool names (SEP-986 compliance is already good)
  • Not changing tool behavior or parameters
  • Not implementing $ref deduplication (blocked on MCP spec support)

Part of #681. Related to #781.

Metadata

Metadata

Assignees

No one assigned

    Labels

    mcpRelated to the MCP server

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions