Skip to content

Tool execution types (client vs server)

Definition

Tools differ by where they execute: client tools run in your application (you send tool_result), while server tools run on Anthropic's infrastructure (results returned directly, no handler code).

Key points

  • User-defined client tools: you write the schema, execute the operation, and send back a tool_result.
  • Anthropic-schema client tools (bash, text_editor, computer use, memory): trained-in schema = more reliable, but your app still executes and returns the tool_result.
  • Server-executed tools (web_search, web_fetch, code_execution, tool_search): Anthropic runs them; results come back in the same response and you never build a tool_result.
  • Client tools cause stop_reason: "tool_use" (continues the Agentic loop); server-tool loops can hit a cap and return pause_turn (see pause_turn handling).
  • Exception: when a server tool is called in the same parallel group as one of your client tools, you still handle the client part.

Why it matters for the exam

  • D1/D2 repeatedly test the client-vs-server boundary — especially that Anthropic-schema tools (bash/text_editor/computer/memory) are still client-executed, a common trap.

Common gotchas

  • "Anthropic-defined" does not mean "Anthropic-executed" — bash/text_editor/computer/memory run in YOUR app.
  • Server tools have usage-based charges (e.g. web search $10/1,000 searches) and never require a tool_result.

See also

Sources