Semantic tool search with embeddings for scalable tool discovery. Enables on-demand tool loading to reduce context usage by 90%+ for large tool libraries.
References (archive): SCAFFOLD_SKILLS_ARCHIVE_MAP.md — embedding/semantic tool discovery from everything-claude-code backend-patterns, tdd-workflow.
Tool Search - Provides semantic tool discovery using embeddings to scale from dozens to thousands of tools with 90%+ context reduction.
Traditional tool loading:
Tool Search with Embeddings:
.claude/.mcp.json){
"betaFeatures": ["advanced-tool-use-2025-11-20"],
"toolSearch": {
"enabled": true,
"autoEnableThreshold": 20,
"defaultDeferLoading": true
},
"mcpServers": {
"repo": {
"deferLoading": true,
"alwaysLoadTools": ["search_code", "read_file"]
},
"github": {
"deferLoading": true,
"alwaysLoadTools": ["create_pull_request", "get_issue"]
}
}
}
Keep 3-5 most-used tools always loaded:
read_file, write_file, search_codecreate_pull_request, get_issuetake_screenshot, navigate_pageMost Beneficial When:
Less Beneficial When:
Agent Workflow:
create_pull_request toolExample:
User: "Create a pull request for my changes"
Agent searches: "github pull request creation"
Tool Search finds: create_pull_request tool
Tool loaded and used
Good:
{
"name": "search_customer_orders",
"description": "Search for customer orders by date range, status, or total amount. Returns order details including items, shipping, and payment info."
}
Bad:
{
"name": "query_db_orders",
"description": "Execute order query"
}
Add guidance in agent prompts:
You have access to tools for Slack messaging, Google Drive file management,
Jira ticket tracking, and GitHub repository operations. Use the tool search
to find specific capabilities when needed.
Don't defer loading for:
Track which tools are discovered:
The tool search uses embeddings to match tools to queries:
The Tool Search Tool itself:
User: "Create a pull request"
Agent workflow:
1. Searches: "github pull request creation"
2. Tool Search finds: create_pull_request tool
3. Tool loaded (3K tokens)
4. Agent uses tool
5. Total context: ~8.7K tokens (vs. 55K traditional)
User: "Search for authentication code"
Agent workflow:
1. Searches: "code search file operations"
2. Tool Search finds: search_code, read_file tools
3. Tools loaded (5K tokens)
4. Agent uses tools
User: "Check Slack messages and create Jira ticket"
Agent workflow:
1. Searches: "slack message reading"
2. Tool Search finds: read_slack_message tool
3. Searches: "jira ticket creation"
4. Tool Search finds: create_jira_ticket tool
5. Both tools loaded (6K tokens total)
Tool search works with MCP servers:
All agents benefit from tool search:
Tool Search works excellently with Programmatic Tool Calling:
Example Workflow:
# Tool Search finds tools
tools = search_tools("github issue management")
# PTC orchestrates multiple tool calls
team = await get_team_members("engineering")
issues = await asyncio.gather(*[
get_issue(member["github_username"]) for member in team
])
# Only final results in context, not all intermediate data
See PTC Patterns Guide for comprehensive PTC documentation.
# Search for git-related tools
node .claude/tools/tool_search.mjs --query "git"
# Search for database tools
node .claude/tools/tool_search.mjs --query "database" --limit 3
# Search for testing tools
node .claude/tools/tool_search.mjs --query "testing"
</usage_example> </examples>
Before starting:
Read .claude/context/memory/learnings.md
After completing:
.claude/context/memory/learnings.md.claude/context/memory/issues.md.claude/context/memory/decisions.mdASSUME INTERRUPTION: If it's not in memory, it didn't happen.
下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer