AgenticMCPFrameworks

Tool use with Claude

by Anthropic

IntermediateDocumentationFree~30 min read

The canonical reference for giving Claude functions it can actually call.

Start LearningAdded Jul 4, 2026 · Updated Aug 16, 2026

Overview

Anthropic's canonical reference for tool use — function calling — on the Claude API. Its organising idea is that tools differ by where the code runs. Client tools, including your own JSON-schema tools and Anthropic-schema tools such as bash, text_editor, memory and computer use, execute in your application: Claude returns stop_reason 'tool_use' with one or more tool_use blocks, your code runs the operation, and you send back a tool_result block. Server tools — web_search, web_fetch, code_execution, advisor and tool_search, plus the MCP connector — run on Anthropic's infrastructure and return results inline with no handler code in your app. The page walks the full client round trip with a get_weather example, then covers when Claude decides to call a tool under the default tool_choice of auto, how to steer that with system-prompt wording or require it outright with tool_choice, and how adding strict: true guarantees the call matches your schema exactly. It documents behaviour when a required parameter is missing (Opus is more likely to ask for it, Sonnet may infer a value), the disable_parallel_tool_use flag, and Tool Runner, which lets the SDKs execute the loop for you. A pricing section explains that the tools parameter and the tool_use and tool_result blocks all consume input tokens, and tabulates the tool-use system-prompt overhead per model. Samples are given in cURL, the ant CLI, Python, TypeScript, C#, Go, Java, PHP and Ruby.

At a Glance

Topic
Agentic
Level
Intermediate
Format
Documentation
Cost
Free
Duration
~30 min read
Provider
Anthropic
Hands-on
Yes — code/exercises
Certificate
None

What You’ll Learn

  • Defining a tool with an input_schema and a description Claude will act on
  • The full round trip: tool_use blocks, local execution, and tool_result replies
  • Where each tool executes — client tools versus Anthropic-run server tools
  • Steering tool calls with system-prompt wording and the tool_choice parameter
  • Guaranteeing exact schema conformance by setting strict: true on a tool
  • How the tools parameter and tool blocks change your input token bill
  • Which built-in server tools exist, including web search, code execution and tool search

Highlights

  • The authoritative source, updated by Anthropic as new tools ship — not a third-party snapshot
  • Runnable samples in eight languages plus cURL and the ant CLI
  • Tabulates the tool-use system-prompt token overhead model by model, which few guides do
  • Documents the awkward edges: missing required parameters, parallel calls, forcing a tool
  • Points at Tool Runner, so you can skip hand-writing the agentic loop entirely

Who It’s For

Best For

  • Engineers building their first tool-using agent on the Claude API
  • Developers moving from single prompts to a multi-turn agentic loop
  • Teams budgeting token cost for a tool-heavy agent

Prerequisites

  • Familiarity with the Claude Messages API and at least one of its SDKs
  • Comfort reading and writing JSON Schema for tool inputs

FAQ

What is Tool use with Claude?

Anthropic's official reference for tool use, or function calling, on the Claude API. It explains the tool_use to tool_result round trip, the split between client tools your code runs and server tools Anthropic runs, how to steer or force tool calls, and what tools cost in tokens. For engineers wiring Claude up to external functions and APIs.

Is Tool use with Claude free?

Tool use with Claude is free to access.

What level is Tool use with Claude for?

Tool use with Claude is aimed at a intermediate audience. Recommended background: Familiarity with the Claude Messages API and at least one of its SDKs, Comfort reading and writing JSON Schema for tool inputs.

How long does Tool use with Claude take?

Expect roughly ~30 min read. Most learners work through it at their own pace.

What will I learn from Tool use with Claude?

You'll learn: Defining a tool with an input_schema and a description Claude will act on; The full round trip: tool_use blocks, local execution, and tool_result replies; Where each tool executes — client tools versus Anthropic-run server tools; Steering tool calls with system-prompt wording and the tool_choice parameter; Guaranteeing exact schema conformance by setting strict: true on a tool; How the tools parameter and tool blocks change your input token bill; Which built-in server tools exist, including web search, code execution and tool search.

Topics

tool-usefunction-callingclaude-apiagentsserver-tools

Sources

This page was written from 2 sources, 1 on domains other than platform.claude.com.

  1. 1.platform.claude.comoverviewvendor
  2. 2.developersdigest.techtool use claude api production patterns