References: Server-side tools and built-ins
Source material
Section titled “Source material”Source curriculum (structural mirror, cited as further study):• Anthropic Academy (https://anthropic.skilljar.com/): "Building with the Claude API" course (server-tools sections) License: Anthropic Academy course content is account-gated; Clawdemy structurally mirrors the Academy's lesson progression as inspiration and cites it as further study. Every substantive claim in this lesson is verifiable against the public Anthropic documentation.
Primary public-doc anchors (every substantive claim verified against):• Anthropic, "Server tools" overview (the shared mechanics) https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools• Anthropic, "Web search tool" (pricing, version strings, citations, error codes, max_uses / domain filtering / user_location) https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool• Anthropic, "Web fetch tool" (the URL-retrieval companion) https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool• Anthropic, "Code execution tool" (sandboxed Python + bash, the free-when-used-with-web_search-or-web_fetch pricing rule, model compatibility table) https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool• Anthropic, "Computer use tool" (beta header, WebArena benchmark, ZDR eligibility, sandboxing posture) https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool• Anthropic, "Tool search tool" (defer_loading, regex + BM25 variants, max 10,000 tools, the 3-5 result count, custom client-side implementation pattern) https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool• Anthropic, "Tool reference" (the directory of all Anthropic- provided tools with model compatibility) https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference
Verbatim claims sourced from the public docs:• "Web search is available on the Claude API for $10 per 1,000 searches, plus standard token costs for search-generated content" (web-search-tool page)• "Code execution is free when used with web search or web fetch. When web_search_20260209 or web_fetch_20260209 is included in your request, there are no additional charges for code execution tool calls beyond the standard input and output token costs" (code-execution-tool page)• "Maximum tools: 10,000 tools in your catalog" (tool-search-tool limits section); "Search results: Returns 3-5 most relevant tools per search"• Tool search variants: tool_search_tool_regex_20251119 (Python re.search syntax, max 200 chars) and tool_search_tool_bm25_20251119 (natural-language queries)• Computer use beta header: computer-use-2025-11-24 for Opus 4.8 / Opus 4.7 / Opus 4.6 / Sonnet 4.6 / Opus 4.5 (computer-use-tool page Note)
Required attribution: "Based on the structure of the Anthropic Academy 'Building with the Claude API' course (https://anthropic.skilljar.com/). This lesson is an independent structural mirror in original prose; every substantive claim is verified against the public Anthropic Claude documentation at https://platform.claude.com/docs/. Anthropic does not endorse it."
This is lesson 5 of 12 in Track 22 (Building with Claude). The previouslesson is lesson 4 (Tool use, the foundation, which opened Phase 2);the next is lesson 6 (Model Context Protocol). Phase 2 (augmentationpatterns) continues.Read this next
Section titled “Read this next”- Anthropic, “Server tools” overview. The shared-mechanics page for server tools: response shape, pause_turn, ZDR + allowed_callers workaround, the shared infrastructure across web_search / web_fetch / code_execution.
- Anthropic, “Web search tool”. The canonical reference; covers dynamic filtering, the full citation block shape, error codes, the user_location parameter, streaming events.
- Anthropic, “Code execution tool”. Model compatibility table, the free-when-used-with pricing rule in full detail, file handling, output limits.
- Anthropic, “Computer use tool”. The full beta reference; benchmarks, action types, the reference desktop implementation pattern.
- Anthropic, “Tool search tool”. defer_loading deep dive, custom client-side implementation pattern with embeddings, prompt-caching interaction, MCP toolset integration.
- Anthropic, “Tool reference”. Directory of every Anthropic-provided tool with current model compatibility.
Going deeper
Section titled “Going deeper”A short, durable list. Each link is a specific next step inside Track 22.
- Lesson 6 of this track, “Model Context Protocol.” The cross-provider tool pattern. The MCP connector lets the model use tools from external MCP servers without your code being the MCP client; mcp_toolset combined with defer_loading (from this lesson) is the production pattern for large external tool catalogs.
- Lesson 7 of this track, “Prompt caching and context management.” Where the tool-definition overhead (custom client + server + Anthropic-schema) becomes cacheable, and where compaction handles long-running server-tool loops that accumulate result context.
- Lesson 8 of this track, “From single call to agent loop.” Where server tools (especially web_search + code_execution pairings) become the per-step capability inside multi-turn agent loops.
- Lesson 11 of this track, “Subagents and Claude Managed Agents.” Where the Advisor server tool (research preview) and the subagent pattern come in.
Adjacent tracks (the natural next destinations)
Section titled “Adjacent tracks (the natural next destinations)”- Track 20 (AI Agents and Tool Use): pick this if you want the full track-level depth on agent design, especially around tool isolation, sandboxing, and the security disciplines this lesson sketches for computer use. T22 L5 here is the Anthropic-specific server-tools instance; T20 develops the broader design principles.
- Track 21 (LLM Ops and Production): pick this if you want the provider-agnostic view of evaluation and observability for tool-using applications (lessons 7 + 10 of that track). The eval-set discipline this lesson recommends (“measure whether the server tool earns its cost”) is from there.
Where this connects inside the track
Section titled “Where this connects inside the track”The Anthropic-platform-side tool layer the rest of T22 extends:
- Lesson 1 (first call): the iterate-the-content-array discipline now extends to 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), and citation blocks. Same array; more block types.
- Lesson 2 (production patterns): pause_turn (introduced here) is a new value to handle in the stop_reason dispatch, alongside end_turn / max_tokens / stop_sequence / tool_use. The mid-stream error and retry policy from L2 extends to server-tool errors (200 status with error code in the result block).
- Lesson 3 (model selection): the effort dial affects ALL tokens including server-tool calls. max_uses on web_search interacts with effort: lower effort plus a max_uses cap is the cheapest configuration.
- Lesson 4 (tool use foundation): client-vs-server distinction made explicit here; Anthropic-schema client tools (bash, computer use, memory, text_editor) reuse L4’s loop.
- Lesson 6 (MCP): same tools declaration shape extended to cross-provider tool definitions.
- Lesson 7 (prompt caching): cuts the repeated tool-definition cost; combines with tool_search for large catalogs.
- Lesson 8 onward (agent loop): the per-step capability set the loop has access to is the union of custom (L4), server (here), Anthropic-schema client (here), and MCP (L6) tools.
- Lesson 12 (shipping): the per-tool cost tracking in usage.server_tool_use.web_search_requests / tool_search_requests is what the Admin / Usage / Cost APIs surface for production monitoring.