fix(sequentialthinking): trim duplicative description sections#4508
Open
STiFLeR7 wants to merge 1 commit into
Open
fix(sequentialthinking): trim duplicative description sections#4508STiFLeR7 wants to merge 1 commit into
STiFLeR7 wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Trims the
sequentialthinkingtool's description string, removing two sections that add token cost without adding selection or usage signal:inputSchema.describe()call — clients receive both, so the text was paid for twice per session.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
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 buildandnpm test(vitest) both pass, 14/14 tests green — no test asserts on the removed description text.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
Checklist
Additional context
This PR was prepared with AI assistance (Claude Code), grounded by reading the current
upstream/mainsource, confirming no existing tests depend on the removed text, and verifying the build/test suite passes after the change.