feat: Custom Tool descriptions #4377
Closed
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.
Add ability to Override tools descriptions system prompt. Example usage - add your description in .roo/tools/read_file.md it will override default tool description it supports args param replacement with "
Related GitHub Issue
Closes: #4010
Description
Adds file based check in .roo/tools/
now it will look for {toolname.md} and if found replace current description with new one from file.
This allows users customize tool usage for specific models.
Some Models like GPT 4.1 and Sonnet 4 are great and require little guidance with tool usage so descriptions can be reduced drastically to achieve same effect.
Test Procedure
For ex. new file:
.roo/tools/read_file.md:
Type of Change
srcor test files.Pre-Submission Checklist
npm run lint).console.log) has been removed.npm test).mainbranch.npm run changesetif this PR includes user-facing changes or dependency updates.Screenshots / Videos
Documentation Updates
Needs new section for advanced users how to customize tool descriptions. Check Test Procedure similar steps how to change descriptions. This also needs needs Warning note that improper custom description will affect or even break ability to call tools.
Additional Notes
.roo/tools/read_file.md it will override default tool description
this supports original args param replacement with data from args for any property
Get in Touch
Roo discord: Basas
Important
This PR adds functionality to override tool descriptions using markdown files with support for argument interpolation.
.roo/tools/.${args}syntax.getToolDescriptionsForModeintools/index.tsto check for overrides usingreadToolOverrideWithArgs.readToolOverrideandinterpolateToolDescriptionfunctions intools.tsfor reading and processing overrides.tool-overrides.test.tsto test default and custom tool descriptions, including argument interpolation and handling of empty/whitespace files.This description was created by
for 0d1200a. You can customize this summary. It will automatically update as commits are pushed.