Learning resourcesReviewed · Anthropic

Define tools: Claude documentation

Define tools is Anthropic's guide for developers connecting Claude to software tools, but some models and thinking settings reject forced calls. It explains tool descriptions, JSON Schema inputs, example arguments and tool_choice controls, with separate interfaces for Messages API and Managed Agents.

Researched 24 Nov 2026

In short.

Define tools is Anthropic's guide for developers connecting Claude to software tools, but some models and thinking settings reject forced calls. It explains how to describe tools, define their arguments, supply input examples and control whether Claude calls them. Its most useful distinction is between general tool availability and the narrower support for mandatory calls. Building a complete application also requires implementing the tools and handling their results, which the page directs readers to separate guides for. API prices and reproducible performance measurements are not supplied; runtime behavior has not been assessed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes the complete selected page at [https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools.md], including metadata, embedded examples, compatibility restrictions, token and caching notices, and API availability tables. Linked pages, linked image contents and external references are excluded. No code, API requests or tool calls were executed. Runtime behavior, performance, current pricing and continued model compatibility remain unverified.

The overview

identity

Define tools is an Anthropic documentation page about specifying tools that Claude can request and controlling their invocation. Its original source address is [https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools.md].

The page covers user-defined tool interfaces, description quality, input examples and output controls. It also distinguishes Anthropic-schema client tools, declared through date-versioned types, from client toolsets that declare several member tools through one entry.

assessment

The guide is useful when designing a Claude tool interface or diagnosing why a request cannot force a particular call. It combines concrete request examples with compatibility restrictions that affect implementation choices.

Its coverage ends before a complete working integration: the weather example defines an interface without implementing a weather service, and execution-loop handling is covered through links. The page's performance advice is qualitative; it supplies no reproducible measurements of tool-selection accuracy, latency or task success.

users

The main audience is developers building Claude applications that retrieve information or perform operations through their own functions. Beginners get a small weather example and explanations of required and optional arguments; experienced developers get details about schemas, model restrictions, caching and API differences.

Readers are expected to understand the tool-use overview and have an API development setup. Someone seeking a complete application will also need guidance on implementing functions, dispatching calls and returning their results.

capabilities

A user-defined tool has a name, a plain-language description and an input_schema describing its arguments through JSON Schema. Optional input_examples demonstrate valid argument objects, including nested structures, formatting conventions and omitted optional fields.

The guide recommends detailed descriptions covering purpose, appropriate use, parameters, returned information and limitations. It also recommends consolidating related operations, adding service prefixes to names and keeping responses focused on information Claude needs.

Custom tools are described as available on every model. Messages API availability covers all supported platforms; Managed Agents availability is specifically listed for Claude API, Claude Platform on AWS and Anthropic-managed Claude Models on Google Cloud.

Using it

requirements

The stated prerequisites are familiarity with Claude's tool-use overview, a Claude API key and a working SDK or cURL setup. Tool inputs require a JSON Schema object. Names must contain 1–128 ASCII letters, digits, underscores or hyphens, matching ^[a-zA-Z0-9_-]{1,128}$.

The application needs an implementation behind each client tool and a way to return results. Model and thinking-mode compatibility must be considered separately from basic tool availability. The page does not specify SDK package versions.

mechanism

Tool definitions tell Claude what functions exist and what arguments they accept. The API combines these definitions, tool configuration and the supplied system prompt into instructions for the model. Input examples are included alongside the schema to demonstrate valid calling patterns.

With Messages API, definitions go in the top-level tools parameter. Claude returns tool_use blocks, and the application sends outputs back as tool_result blocks in the next request. With Managed Agents, tools are declared with type custom; calls arrive as agent.custom_tool_use events and results use user.custom_tool_result events.

The tool_choice modes are auto, any, tool and none. Auto lets Claude decide whether to call a tool; any requires one of the available tools; tool requires a named tool; none prevents calls. Mandatory modes depend on model and thinking-setting support.

setup

For Messages API, define the tool's name, description and input_schema, then place the definition in the request's tools array. Explain when the tool should be used, what each argument means and what the result contains. The guide recommends at least three or four sentences for a tool description, with more detail for complex behavior.

Add input_examples when concrete argument patterns would help, and validate each example against the schema yourself. Choose a compatible tool_choice mode, implement call handling and return tool_result blocks. Examples cover cURL, the ant CLI, Python, TypeScript, C#, Go, Java, PHP and Ruby.

example

The weather example defines get_weather with a required location string and an optional unit restricted to celsius or fahrenheit. Example inputs include San Francisco with fahrenheit, Tokyo with celsius and New York without a unit. Together, these demonstrate the accepted values and that the unit can be omitted.

The input-example request uses claude-opus-5-5, while the forced-call example uses claude-opus-5. That difference matters because the page explicitly lists Claude Opus 5.5 among models rejecting forced calls. These are illustrative requests; no weather lookup or API execution has been assessed.

Assessment & evidence

limitations

The page says any and tool return HTTP 400 errors on Claude Fable 5.2, Claude Mythos 5.2, Claude Opus 5.5, Claude Sonnet 5.5, Claude Fable 5.1 and Claude Mythos 5.1. Auto and none remain supported. On those models, auto with strict tool use can provide schema-valid inputs without guaranteeing that a call happens.

Invalid input examples usually cause a 400 error, but validation can be skipped in some cases involving schema patterns, allowing Claude to see an invalid example. Input examples work with user-defined tools and only some Anthropic-schema client tools.

Natural-language text accompanying calls can vary. Applications should handle the structured call blocks and avoid depending on a particular explanatory phrase. Schema-valid arguments alone do not establish that tool selection or returned information is correct.

reasoning

Manual extended thinking with thinking type enabled rejects any and tool. Adaptive thinking alone does not prevent forcing, although the model restrictions listed elsewhere still apply.

On models accepting forced calls, any and tool make the response start with tool_use and omit both preceding natural-language explanation and a thinking block. The page recommends auto with an explicit request to use the tool when thinking or explanatory context before the call is wanted; this influences selection without guaranteeing invocation.

For tool parameters asking why an action was chosen, the guide recommends a short explanation or supporting evidence. It warns that requests for internal thinking or step-by-step reasoning can trigger a reasoning_extraction refusal.

alternatives

For a fixed JSON response, the page points to structured outputs [https://platform.claude.com/docs/en/build-with-claude/structured-outputs]. For schema-valid tool arguments, it points to strict tool use [https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use]. These address output structure; mandatory invocation still depends on model support.

For automating the call-and-result loop, the page links the SDK tool runner [https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-runner]. The linked pages are outside the supplied scope, so their full requirements, costs and behavior are not assessed. The guide provides no comparison with other providers.

evidence

The evidence is the complete captured Define tools page from [https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools.md]. It includes model and platform metadata, tool-definition guidance, request examples, compatibility notices and separate API availability tables.

Its examples establish the documented request patterns, not successful execution. The page makes a qualitative claim that forced calls should not reduce performance, but supplies no accompanying benchmark method or results. Actual accuracy, reliability and latency remain unassessed.

Access & freshness

costs

The page supplies no monetary API prices, subscription requirements or total integration cost. Those costs remain unknown.

Input examples consume additional input tokens. The page estimates about 100 tokens for an example with a few flat values and about 200 for one containing nested objects; these are approximate token counts, not prices.

Changing tool_choice invalidates cached message blocks, requiring message content to be reprocessed. The page says tool definitions and system prompts remain cached. The resulting monetary impact is not quantified.

rights

The supplied page does not state a reuse licence or redistribution permission for its prose or code examples. Rights to copy, modify or redistribute those materials are therefore unknown from this evidence.

freshness

The supplied copy was captured on 24 November 2026 at 17:18:17.467 UTC and marks the feature as stable. Its cURL examples use the anthropic-version value 2026-10-21; that API header does not establish the page's publication date.

No visible publication or last-update date is supplied. The listed model restrictions and platform availability describe the captured copy; their continued accuracy after capture is unknown.

actions

Choose the API product, target model and thinking setting before choosing call controls. For a first integration, define one narrow tool with clear arguments, a detailed description and independently validated examples. Implement the underlying function and result handling alongside the definition.

Evaluate call selection and argument validity separately using representative requests. Where forcing is unsupported, use auto and consider strict tool use for argument structure. Where forcing is supported and required, account for the absence of preceding explanation and thinking. Consult current pricing before estimating operating cost.

Evidence for this report

selected-page.txtselected · checked 2026-11-24