Learning resourcesReviewed · Anthropic

Claude strict tool use guide

Strict tool use is an Anthropic guide for developers connecting Claude to application functions, but correctly formatted inputs can still contain the wrong values. It explains how strict: true constrains tool arguments to a supported JSON Schema, with API and SDK examples, toolset exclusions and data-retention qualifications.

Researched 24 Nov 2026

In short.

Strict tool use is an Anthropic guide for developers building Claude agents, but matching an input format does not guarantee the right action. It documents schema-constrained tool arguments, configuration examples and explicit exclusions for computer-use and browser-use toolsets. The supported schema subset is explained on a separate page; pricing, performance and end-to-end agent reliability are not established here.

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

Covers the complete selected page at [https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use.md], including examples, model and platform metadata, toolset exclusions, schema caching and qualified zero data retention and HIPAA notices. Linked pages are excluded, including the detailed JSON Schema limitations and data-handling policies. The documentation supplies illustrative behavior; no code or API requests were executed, and runtime guarantees, performance, pricing and application compliance were not independently assessed.

The overview

Identity

This is Anthropic's Strict tool use documentation page at [https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use.md]. It teaches a Claude Messages API feature through explanations, HTTP and CLI requests, and examples in Python, TypeScript, C#, Go, Java, PHP and Ruby.

Assessment

The guide is useful when tool integrations fail because arguments have incorrect types, required fields are missing or unexpected properties appear. It provides a concrete configuration change and shows where the resulting arguments appear in a response.

The documented guarantee concerns schema conformance. An implication of that scope is that applications still need controls for business rules, permissions and incorrect values that satisfy the schema. The page's claims about production reliability at scale have no accompanying measurements.

Users

The primary audience is developers defining functions that Claude can call, including developers building agents with several tools or nested inputs. Beginners receive examples in several languages, although familiarity with API requests, JSON and application-side tool handling is helpful.

Experienced developers can use it to understand the scope of the input guarantee and identify configuration details that affect reliability. A complete application architecture or agent execution loop is not supplied.

Capabilities

The page states that strict: true makes generated tool inputs conform to input_schema. Its examples constrain property types, required fields, permitted values through enum, and extra properties through additionalProperties: false. It also describes support for nested properties.

The documented response contains tool_use blocks, with arguments in response.content[x].input. The page also guarantees valid tool names drawn from provided tools or server tools. Its travel example places multiple strict tool definitions in one request.

Using it

Requirements

Using the feature requires access to a supported Claude API environment, authentication, a tool schema and application code to handle tool calls. Schemas must fit the supported JSON Schema subset. The detailed keyword limitations are on a linked page and are not established by this page alone.

The page lists stable support on Claude API, Amazon Bedrock, Claude Platform on AWS, Claude Models on Google Cloud and Microsoft Foundry. Its availability section says all models on supported platforms. Minimum SDK versions, account-specific access and regional availability are not specified.

Mechanism

Anthropic describes compiling input_schema into a grammar that limits which tokens the model can generate. This grammar-constrained sampling restricts generation to arguments that satisfy the supported schema.

The feature uses the same grammar pipeline as structured outputs. Compiled schemas are temporarily cached, with the page describing a retention window of up to 24 hours since last use.

Setup

Define a tool with name, description and input_schema, then add strict: true at the top level of that tool definition. Include the definition in the request's tools array. The examples use an object schema with properties, an explicit required list and additionalProperties: false.

The direct HTTP examples call /v1/messages with an API key and anthropic-version: 2026-10-21. Handle returned tool_use blocks in application code. The examples print responses and do not demonstrate a complete cycle of executing a function and returning its result to Claude.

Example

The weather example defines get_weather with a required string location and an optional unit restricted to celsius or fahrenheit. Its illustrated response contains location set to San Francisco, CA and omits unit, which the schema allows.

This demonstrates the expected tool-call structure. It supplies no evidence of a weather service being called or an actual forecast being returned.

Assessment & evidence

Limitations

Only a subset of JSON Schema is supported; the complete restrictions are outside this page. The computer_toolset_20260801 and browser_toolset_20260801 entries reject requests that set strict: true on them.

The stated guarantee applies to tool inputs and valid tool names. This page does not establish that strict mode forces a tool call, chooses the appropriate tool, produces factually correct arguments or ensures successful execution by an external service.

Reasoning

An inference from the described mechanism is that an integer passenger count can satisfy the schema while still being wrong for the request. The booking illustration's passengers: 2 should therefore not be treated as evidence that strict mode always extracts the intended count.

The travel examples expose another practical detail: travelers and guests have integer enums but are absent from their required lists. A schema-valid call may omit those counts even when the prompt mentions two people. Developers must encode essential fields explicitly rather than assume that declaring a property makes it mandatory.

Alternatives

The page identifies structured outputs as the related option for validated JSON responses, using the same grammar-constrained sampling approach [https://platform.claude.com/docs/en/build-with-claude/structured-outputs]. It also points to Define tools for non-strict schema guidance [https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools].

Those linked pages are outside the available evidence. Their detailed restrictions and comparative suitability are not assessed, and this page supplies no comparison with other providers.

Evidence

The evidence is a complete capture of the selected first-party documentation page. It contains feature statements, configuration examples, illustrative output, platform metadata and data-handling notices.

It contains no executed test records, benchmarks or independent validation. Schema-edge behavior, measured performance and end-to-end agent reliability remain unassessed; descriptions of consistent production operation are vendor assertions.

Access & freshness

Costs

The page provides no API prices, strict-mode surcharge, schema-compilation charges or measured latency. Total cost, any separate feature charge and performance overhead are unknown.

It links to guidance about caching tool definitions to reduce cost and latency, but gives no savings figures or comparisons on this page.

Rights and data handling

No explicit redistribution licence for the documentation or examples, or commercial-use terms for the API, appears on this page. Those permissions and terms are unknown.

The page describes qualified zero data retention eligibility that excludes Covered Models, a category defined on a linked page. Its notice says prompts and outputs are not stored under that qualification, while schemas may be cached for up to 24 hours since last use. The excluded-model list and full eligibility conditions are not provided here.

The page describes HIPAA eligibility but prohibits protected health information in schema definitions, including property names, enum values, const values and pattern expressions. It explains that cached schemas receive different protections from message content. Eligibility does not establish that a particular application meets its obligations.

Freshness

The documentation capture is dated 24 November 2026 at 23:41:49 UTC. The page's publication and last-update dates are unknown.

The captured metadata labels the feature stable. Examples use claude-opus-5-5 and the HTTP API version header 2026-10-21. These are documented identifiers in the captured text; their current availability and compatibility are not independently established.

Actions

Before adopting the feature, confirm the supported schema keywords and model/platform eligibility for the intended environment. Mark every essential argument as required and choose constraints that reflect the application's permitted values.

Plan application checks for meaning, authorization and downstream errors. Confirm pricing and applicable retention terms, especially the Covered Models qualification and schema-caching rules. Evaluate actual calls and failure cases before relying on the feature for consequential actions.

Evidence for this report

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