Set "strict": true on a tool definition and Claude's tool calls are guaranteed to match your input_schema. The API constrains sampling to schema-valid output, so the input always fits the schema and the tool name is always valid.
How it works
strict is a top-level property of the tool, next to name, description and input_schema. It is not part of tool_choice. The API compiles the schema into a grammar and samples only tokens that fit it. This is the same pipeline structured outputs use, and the schema follows the same JSON Schema limits.
Without strict mode, Claude can return "2" where you need 2, or leave out a required field. With strict: true, a booking tool that declares passengers as an integer always gets passengers: 2. Your handler can drop retry logic for bad argument types and for unknown tool names. The valid name is one of your tools or a server tool.
What it does not cover
Strict mode guarantees two things: the input matches the schema, and the name is a valid tool. It does not force a call on every turn and does not limit a response to one call. For those, use tool_choice and disable_parallel_tool_use.
It is rejected on the computer use and browser use toolsets and is not available on mcp_toolset. Tools with strict: true cannot be called through programmatic tool calling. It does work with tool search: the grammar is built from the full declared toolset, so deferred tools and strict mode combine without recompiling.
Data retention
Compiled schemas are cached for up to 24 hours since last use, separately from message content. Strict tool use is HIPAA eligible, but protected health information must not appear in the schema: not in property names, enum values, const values or pattern expressions. Keep PHI in the messages, where it is protected.
Where the exam catches people
Believing strict belongs inside tool_choice: it goes on each tool definition.
Believing strict mode forces a tool call or a single call: it only guarantees valid inputs and a valid tool name.
Believing HIPAA eligibility covers the schema too: cached schemas lack PHI protections, so PHI must stay out of them.
Believing tool search forces a grammar rebuild on each discovery: the grammar comes from the full toolset, so the two compose.