Skip to content

fix(sequentialthinking): trim duplicative description sections#4508

Open
STiFLeR7 wants to merge 1 commit into
modelcontextprotocol:mainfrom
STiFLeR7:fix/issue-4507-trim-sequentialthinking-description
Open

fix(sequentialthinking): trim duplicative description sections#4508
STiFLeR7 wants to merge 1 commit into
modelcontextprotocol:mainfrom
STiFLeR7:fix/issue-4507-trim-sequentialthinking-description

Conversation

@STiFLeR7

Copy link
Copy Markdown

Description

Trims the sequentialthinking tool's description string, removing two sections that add token cost without adding selection or usage signal:

  • "Parameters explained" duplicated content already carried by each parameter's own inputSchema .describe() call — clients receive both, so the text was paid for twice per session.
  • "Key features" described the tool's internal virtues rather than when to call it, and didn't add anything the "When to use this tool" section doesn't already convey.

The intro paragraph, "When to use this tool" (selection signal), and "You should" (behavioral guidance once the tool is invoked) are all kept unchanged.

Fixes #4507

Server Details

  • Server: sequentialthinking
  • Changes to: tools (description text only, no schema/behavior change)

Motivation and Context

Per #4507: the tool definition costs ~921 tokens per session (tiktoken cl100k), about half of which is the description, and roughly half of the description duplicates content the client already receives via the input schema. This trim removes the duplicated/non-selection-relevant text.

How Has This Been Tested?

  • npm run build and npm test (vitest) both pass, 14/14 tests green — no test asserts on the removed description text.
  • Manually diffed the description string before/after to confirm only the "Key features" and "Parameters explained" blocks were removed; input schema, output schema, and tool behavior are untouched.

Breaking Changes

None — this only changes the human/LLM-facing description string, not the tool's name, schema, or behavior. No client configuration changes required.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Protocol Documentation
  • My changes follows MCP security best practices
  • I have updated the server's README accordingly (README doesn't reproduce the tool description; no update needed)
  • I have tested this with an LLM client
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling (n/a — no new logic added)
  • I have documented all environment variables and configuration options (n/a — no new config)

Additional context

This PR was prepared with AI assistance (Claude Code), grounded by reading the current upstream/main source, confirming no existing tests depend on the removed text, and verifying the build/test suite passes after the change.

The tool description repeated content already carried by each
parameter's own inputSchema `.describe()` call ("Parameters
explained") and listed implementation virtues unrelated to tool
selection ("Key features"). Removing both keeps the same selection
signal (intro + "When to use this tool" + "You should") while cutting
the definition's per-session token cost roughly in half.

Fixes modelcontextprotocol#4507
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sequentialthinking's tool definition costs ~921 tokens/session; about half duplicates the schema's own parameter descriptions

1 participant