feat(decopilot): add tool_search built-in tool#2453
Open
Conversation
…ique to review-pr - Rename skill directories for clearer naming - Update skill names, descriptions, and internal references - Update plan-with-critique to reference review-plan Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Creates implementation plans using subagent and automatically runs review-plan skill for multi-perspective critique and improvement. Workflow: - Spawn planning subagent to write plan to /plans/<name>.plan.md - Automatically invoke review-plan for critique - Enforces critique step with red flags and rationalization table Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implement tool_search built-in tool that allows agents to discover available tools in their current context. The tool queries the MCP client's listTools() method and returns tool names and descriptions with optional query filtering. Implementation details: - Simple server-side tool that reuses existing mcpClient - Optional query parameter for substring filtering - Returns tool metadata (name, description) - Includes annotations (readOnlyHint, etc.) and latency tracking - Full test coverage with 6 unit tests Technical changes: - Add createToolSearchTool() function and schemas - Update getBuiltInTools() to accept mcpClient parameter - Pass mcpClient from routes.ts to built-in tools - Update test files to include mock mcpClient Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Contributor
🧪 BenchmarkShould we run the Virtual MCP strategy benchmark for this PR? React with 👍 to run the benchmark.
Benchmark will run on the next push after you react. |
Contributor
Release OptionsShould a new version be published when this PR is merged? React with an emoji to vote on the release type:
Current version: Deployment
|
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.
What is this contribution about?
Implements
tool_search, a new built-in tool for decopilot agents to discover available tools in their current execution context.Key features:
listTools()methodTechnical approach:
mcpClientfrom the conversation flowmcpClientparameter togetBuiltInTools()functionagent_searchandsubtaskbuilt-in toolsThis addresses the need for agents to introspect their available toolset before attempting to call tools.
Screenshots/Demonstration
N/A - This is a backend tool with no UI changes.
How to Test
1. Run Unit Tests
bun test apps/mesh/src/api/routes/decopilot/built-in-tools/tool-search.test.tsExpected: All 6 tests pass ✓
2. Test Tool Registration
bun test apps/mesh/src/api/routes/decopilot/built-in-tools/registration.test.tsExpected: Tests pass, confirming tool_search is registered in getBuiltInTools()
3. Test in Decopilot Conversation (Manual)
bun run devtool_search()- returns all available toolstool_search({ query: "slack" })- returns tools matching "slack"toolsarray withnameanddescriptionfieldstotalFoundcount4. Verify Type Safety
Expected: No TypeScript errors
Migration Notes
N/A - No database migrations or configuration changes required.
Review Checklist
Summary by cubic
Adds tool_search, a built-in tool that lets decopilot agents discover and filter available tools from the MCP client. Also updates planning/review skills with clearer names and a streamlined workflow.
New Features
Refactors
Written for commit 9b2b108. Summary will update on new commits.