Category Who executes Schema you author Examples Server tools Anthropic Just type identifier web_search, web_fetch, code_execution Anthropic-schema client tools You Anthropic publishes schema bash, computer use, memory, text_editor Tool infrastructure Anthropic Mixed tool_search, MCP connector (L6)
Decision: who owns the capability + who runs the code?
Tool Type identifier Pricing ZDR web_search web_search_20260209 (dynamic filtering) / web_search_20250305 (basic)$10 / 1,000 searches ($0.01 each)Basic: eligible. Dynamic filtering: NOT eligible web_fetch web_fetch_20260209 (dynamic filtering) / web_fetch_20250910 (basic)Standard tokens (no per-fetch charge) Basic: eligible. Dynamic filtering: NOT eligible code_execution code_execution_20260120 / code_execution_20250825FREE when used with web_search_20260209 or web_fetch_20260209 ; otherwise standard per-execution pricingNOT eligible
The canonical case: search plus computation with one tool declared. Dynamic filtering runs code internally:
tools = [ { " type " : " web_search_20260209 " , " name " : " web_search " } ]
If the task also needs top-level code execution beyond filtering search results (plotting, file writes, a calculation independent of search), declare both. The per-execution charge stays waived because web_search_20260209 is in the request:
{ " type " : " web_search_20260209 " , " name " : " web_search " },
{ " type " : " code_execution_20260120 " , " name " : " code_execution " },
Computation only with no search or fetch: declare code_execution_20260120 alone and pay standard per-execution pricing.
Param Use for max_usesCap searches per request (cost guardrail) allowed_domainsWhitelist sources blocked_domainsBlacklist sources user_locationLocalize results (approximate; city/region/country/timezone)
Citations: always on ; web_search_result_location blocks with url / title / encrypted_index / up to 150 chars of cited_text . Display to end users per docs.
Tool What it does bashExecute shell commands text_editorCreate + edit files memoryPersist knowledge across conversations computer use (beta)Screenshots + mouse + keyboard
Same L4 client loop (tool_use → execute → tool_result ). Brief tool descriptions OK because the model already knows the canonical tool.
Beta header required: computer-use-2025-11-24 for Opus 4.8 / Opus 4.7 / Opus 4.6 / Sonnet 4.6 / Opus 4.5; earlier header for older models.
ZDR eligible. State-of-the-art on WebArena.
Sandbox the environment: VM, container, or isolated profile with minimum credentials. Never against real desktop or production-reachable systems. Treat the agent like a contractor with access only to what they need.
Track 20 (“AI Agents and Tool Use”) goes deeper on agent-design at track-level depth.
{ " type " : " tool_search_tool_regex_20251119 " , " name " : " tool_search_tool_regex " },
{ " name " : " get_weather " , " description " : " ... " , " input_schema " : { ... }, " defer_loading " : True },
{ " name " : " search_files " , " description " : " ... " , " input_schema " : { ... }, " defer_loading " : True },
# ...many more deferred tools
Variant Query type tool_search_tool_regex_20251119Python re.search patterns (max 200 chars) tool_search_tool_bm25_20251119Natural-language queries
Use when Skip when tool_search 10+ tools / >10k definition tokens / selection accuracy issues / MCP with 200+ tools <10 tools / all-used-frequently / <100-token total
Max 10,000 tools in catalog. Returns 3-5 per search.
tool_search tool itself NEVER has defer_loading: true .
Keep 3-5 most-used tools non-deferred.
Preserves prompt caching (deferred tools not in system-prompt prefix).
{ "type" : " text " , "text" : " I'll search. " },
{ "type" : " server_tool_use " , "id" : " srvtoolu_... " , "name" : " web_search " ,
"input" : { "query" : " ... " } },
{ "type" : " web_search_tool_result " , "tool_use_id" : " srvtoolu_... " ,
"content" : [ /* search results */ ] },
{ "type" : " text " , "text" : " Based on... " , "citations" : [ ... ] }
"stop_reason" : " end_turn "
server_tool_use + the matching tool-specific result block (web_search_tool_result , code_execution_tool_result , web_fetch_tool_result , tool_search_tool_result ) INLINE.
No round-trip in your code.
Iterate response.content, surface text + citations.
stop_reason typically end_turn . Mid-loop: pause_turn (send back as assistant turn, re-call to continue).
Total cost per call = standard tokens
+ server-tool results in context (as input tokens on next turns)
• Declare web_search_20260209 (or web_fetch_20260209) → code-execution per-execution charge is waived
• max_uses on web_search → cap runaway
• Cache stable tool definitions (L7) → drop repeated tool overhead
• tool_search for large catalogs → keep most defs out of context
• Eval-set discipline (L3 + Track 21 L7) → measure tool earns its cost
Tool ZDR web_search (basic: web_search_20250305) Eligible web_search (dynamic filtering: web_search_20260209) NOT eligible web_fetch (basic: web_fetch_20250910) Eligible web_fetch (dynamic filtering: web_fetch_20260209) NOT eligible code_execution NOT eligiblecomputer use Eligible bash / text_editor / memory Standard messages-API ZDR tool_search Eligible
Failure Recognize by Fix Building your own web search Wasted effort on solved problem Drop in web_search server tool Paying standalone code_execution when search or fetch is also in flight Surprise per-execution charges Declare web_search_20260209 or web_fetch_20260209 in the same request (per-execution charge is waived) Computer use against real env Real-world side effects Sandbox: VM / container / isolated profile tool_search below threshold Complexity without benefit Standard tool calling for <10 tools Skipping citations UX miss + docs-recommended discipline Always display web_search citations to end users Ignoring per-tool ZDR Compliance gap Check the table above before declaring
Topic Lands at Model Context Protocol (cross-provider tools) Lesson 6 Prompt caching on tool definitions Lesson 7 The agent loop (model + tools across many turns; pause_turn in prod) Lesson 8 onward Subagents and Claude Managed Agents Lesson 11 Advisor server tool (research preview) Beyond T22; see docs
Anthropic public Claude docs: Web search , Code execution , Web fetch , Computer use , Tool search , Server tools at https://platform.claude.com/docs/en/agents-and-tools/tool-use/. Structural-mirror citation; see references.