Claude Tool Use Documentation
Anthropic's official guide to tool use (function calling) with Claude: defining tools, the tool_use and tool_result round trip, parallel calls, strict schemas, the SDK tool runner and server tools such as web search. The clearest place to learn the agent loop from one provider's API before you add any framework.
Free
Claude Docs · Sept 2026
Guide
AI & Machine Learning
Anthropic
An afternoon for the core pages, then reference
Intermediate
Free
What this documentation covers
Tool use is how Claude asks your application to do something: look up an order, query a database, call an API. The tool use section of the Claude Docs explains the whole mechanism, and it is written for developers who already know how to send a basic Messages API request.
The pages follow the order you meet things when building an agent:
- Overview and how tool use works: client tools, which run in your code, versus server tools such as web search, web fetch and code execution, which run on Anthropic's side.
- Define tools: names, descriptions and
input_schema, plustool_choicefor letting the model decide, forcing a call or disabling tools. - Handle tool calls: reading
tool_useblocks, returningtool_resultblocks with the matching id, and signalling errors withis_errorso the model can recover. - Parallel tool use: several calls in one turn, and why all results go back together in one message.
- Strict tool use: setting
strict: trueso arguments always match your schema. - Tool runner: an SDK helper that runs the loop for you once you understand it.
- Anthropic-schema tools: memory, bash, text editor and computer use tools that Claude is trained on but your code executes.
Every example is shown in cURL, Python, TypeScript and several other SDK languages, and there is a step-by-step tutorial that grows a single tool call into a full agent loop.
Is it worth reading if I plan to use a framework?
Yes, and preferably first. Frameworks such as LangGraph, the OpenAI Agents SDK and the Claude Agent SDK all wrap this same loop. If you have written it once by hand from these pages, you will read framework traces, debug odd tool calls and understand error messages far faster. The pricing section is also worth a look: it explains that tool definitions and results count as input tokens on every call, which is the root of most agent cost surprises.
Prerequisites and time
You need basic Python or TypeScript, an API key from the Claude Console and some familiarity with JSON. The overview, define tools and handle tool calls pages take an afternoon to read and try. The rest is reference you return to as your agent grows.
Free or paid?
The documentation is free. Calling the API is billed per token by Anthropic, so keep experiments small and set a spending limit in the Console while you learn.
What you can do after it
Write the agent loop without a framework, define tools a model uses correctly, return errors the model can act on, handle parallel calls, and explain how tool calling differs between Claude and other providers.
Common questions
Is this the same as the Claude Agent SDK? No. This is the plain API, where you run the loop and every tool. The Claude Agent SDK is a separate library that packages Claude Code's loop and built-in tools.
Does it cover MCP? It links to the MCP connector for calling remote MCP servers from the API. Building your own server is covered by the Model Context Protocol documentation.
Ready to start?
Opens on Anthropic in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.