Anthropic has released three beta features for intelligent tool orchestration with Claude, addressing the core challenges of building effective AI agents: context management, latency, and accuracy.
The Three Features
1. Tool Search Tool
Problem: Loading hundreds of tool definitions bloats context and wastes tokens. Solution: Discover tools dynamically usingdefer_loading: true.
python{
"name": "get_weather",
"description": "Get current weather for a location",
"defer_loading": true # Tool discovered on-demand
}
2. Programmatic Tool Calling
Problem: Multi-step workflows require many inference passes, creating latency. Solution: Let Claude write Python code that orchestrates multiple tools in a single execution.python# Claude generates code like this:
results = []
for city in ["NYC", "LA", "Chicago"]:
weather = get_weather(city)
results.append(weather)
return aggregate(results)
allowed_callers: ["code_execution_20250825"] and document return formats explicitly.
3. Tool Use Examples
Problem: Complex parameter formats lead to errors. Solution: Provide concrete usage patterns throughinput_examples.
python{
"name": "search_database",
"input_examples": [
{"query": "recent orders", "limit": 10},
{"query": "user:123", "include_deleted": true}
]
}
Choosing the Right Feature
Bottleneck | Solution |
|---|---|
| Context bloat | Tool Search Tool |
| Large intermediate results | Programmatic Tool Calling |
| Parameter errors | Tool Use Examples |
Performance Improvements
Metric | Before | After |
|---|---|---|
| Token usage | 43,588 | 27,297 (37% reduction) |
| Knowledge retrieval | 25.6% | 28.5% |
| GIA benchmarks | 46.5% | 51.2% |
Implementation
Enable with the beta flag:
pythonclient.beta.messages.create(
betas=["advanced-tool-use-2025-11-20"],
model="claude-sonnet-4-5-20250929",
tools=[
{"type": "tool_search_tool_regex_20251119"},
{"type": "code_execution_20250825"},
# Your tools with defer_loading, allowed_callers, input_examples
]
)
Key Takeaways
- 1.Layer features strategically - Don't enable everything; choose based on your bottleneck
- 2.Start with Tool Use Examples - Easiest to implement, immediate accuracy gains
- 3.Add Tool Search for scale - When you have 10+ tools
- 4.Use Programmatic Calling for workflows - When you need multi-step orchestration
Source: Anthropic Engineering Blog