Anthropic's tool-use story has a small twist that pays back later: it splits tools into three categories, all defined in the same tools array but with different shapes.
- Custom tools — your tools, defined by
name,description, andinput_schema(JSON Schema). This is what 95% of developers reach for first and what looks identical to other providers. - Anthropic-defined tools — pre-built tools that Anthropic ships and the model knows natively, like
computer_20250124,text_editor_20250124, andbash_20250124. You declare them by type; Anthropic owns the schema. Their existence is why Claude can drive a real computer in Claude Code without you teaching it the action verbs. - MCP server tools — Anthropic's API can talk to MCP servers directly, advertising those tools alongside your custom ones in the same array. We will see this again in the MCP track.
Mechanically, Anthropic's loop is clean: send messages with tools, read back content blocks. A response's content is a list — text blocks have type: "text", tool calls have type: "tool_use" with name and input (a real dict, not a JSON string). Tool results go back as a user message containing a tool_result block referencing the original tool_use.id.
The stop_reason field is the loop's authoritative signal: "end_turn" means the model is done, "tool_use" means it called a tool, "max_tokens" means you ran out of budget. Branch on it; never branch on text.