Skip to content

Add tool description length warnings to help developers avoid LLM context limits #523

Open
@olaservo

Description

@olaservo

Is your feature request related to a problem? Please describe.
MCP server developers often create tools with overly long descriptions without realizing that downstream LLM providers have context length limitations. This leads to issues where:

  • Tool descriptions that work fine in testing fail when integrated with certain LLM providers
  • Different LLMs have varying sensitivities to tool description lengths
  • The combined length of tool titles, descriptions, and parameter descriptions all consume context window space

Describe the solution you'd like
Add warnings/indicators in the MCP Inspector when:

  1. Tool descriptions exceed common length thresholds (e.g., warn at 500 characters, alert at 1000)
  2. Tool names exceed typical limits (e.g., 64 characters)
  3. The combined length of all tool metadata (title + description + parameter descriptions) exceeds reasonable thresholds

The Inspector could display:

  • Visual indicators (eg yellow or red highlighting) when exceeding recommended limits
  • A tooltip or info box explaining that these limits vary by LLM provider but providing general guidance
  • Total context usage estimate for all tools combined

Describe alternatives you've considered

  • Adding hard limits to the MCP specification itself (rejected as too prescriptive since limits vary by provider and may change over time)
  • Only documenting best practices in the User Guide (helpful but doesn't provide immediate feedback during development)
  • Leaving it to individual host implementations like Cursor to warn users (too far downstream from where the issue originates)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttoolsIssues related to testing tools

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions