refactor: shorten tool descriptions to focus on when-to-use instead of how-to-use#49
Open
danieliyahu1 wants to merge 5 commits into
Open
refactor: shorten tool descriptions to focus on when-to-use instead of how-to-use#49danieliyahu1 wants to merge 5 commits into
danieliyahu1 wants to merge 5 commits into
Conversation
…f how-to-use The tool description files (spawn.txt, read.txt, write.txt, list.txt, kill.txt) previously contained verbose usage instructions, parameter docs, and examples that read like tutorial material. The AI agent doesn't need to re-read this on every turn — the parameter schemas (Zod) already describe each parameter. Key changes: - spawn.txt: now leads with explicit decision criteria telling the agent when to choose pty_spawn over the built-in bash tool - All 5 files: trimmed to 2-5 lines, focused purely on tool purpose and decision boundary Before: 171 lines across 5 files After: 10 lines across 5 files
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.
Problem
The 5 tool description files (
spawn.txt,read.txt,write.txt,list.txt,kill.txt) contained verbose usage instructions, parameter docs, and examples — 171 lines total. The AI agent doesn't need to re-read tutorial material on every turn; the Zod parameter schemas already describe each parameter.More importantly, the descriptions gave the agent no guidance on when to choose
pty_spawnover the built-inbashtool, forcing users to use the magic keyword "session" to trigger the right behavior.Changes
All 5 files reduced from 171 lines to 10 lines total:
spawn.txt— now leads with explicit decision criteria: when to usepty_spawnvs the built-inbashtoolread.txt,write.txt,list.txt,kill.txt— trimmed to 1-3 lines focused purely on tool purposeWhy
The
tool()function in the plugin SDK only has a singledescription: stringfield — there is no separateinstructionsornotesfield. All communication about the tool goes through this one string. These descriptions should tell the agent what the tool is and when to use it, not how it works under the hood.Before/After