feat: add Anthropic tool_search_tool_bm25_20251119 for lazy loading#260
Open
feat: add Anthropic tool_search_tool_bm25_20251119 for lazy loading#260
Conversation
Add support for Anthropic's Advanced Tool Use standard by implementing
the tool_search_tool_bm25_20251119 tool alongside existing retrieve_tools.
This tool name is fine-tuned into Claude models for on-demand tool
discovery. Returns tool_reference content blocks per Anthropic's custom
implementation format, enabling lazy loading of tools.
Key changes:
- Add tool_search_tool_bm25_20251119 tool registration
- Implement handleToolSearchBM25 handler with BM25 search
- Return tool_reference format: [{"type":"tool_reference","tool_name":"..."}]
- Fixed 5-result limit per Anthropic standard
- Full activity logging (Spec 024)
References:
- https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool
- https://www.anthropic.com/engineering/advanced-tool-use
Closes: anthropics/claude-code#7336
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Deploying mcpproxy-docs with
|
| Latest commit: |
af2831c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://73d6335f.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://feat-anthropic-tool-search-s.mcpproxy-docs.pages.dev |
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 21031580778 --repo smart-mcp-proxy/mcpproxy-go
|
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.
Summary
tool_search_tool_bm25_20251119tooltool_referencecontent blocks per Anthropic's custom implementation formatretrieve_toolsfor backward compatibilityChanges
tool_search_tool_bm25_20251119tool registration inregisterTools()handleToolSearchBM25handler using existing BM25 search index[{"type":"tool_reference","tool_name":"server:tool"}]References
Test plan
go build ./cmd/mcpproxy/...)go test ./internal/server/... -run TestMCP)🤖 Generated with Claude Code