strict-tool-use changedagents-and-tools/tool-use/strict-tool-use
Recorded here
Lines+57added
Lines−2removed
From line
2
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits13to this page, all time
## Availability ### API support #### [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) ### Data handling
The whole hunk
from line 2, old and new numbered
/
from line 2
22title: Strict tool use
33url: https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use
44description: Enforce JSON Schema compliance on Claude's tool inputs with grammar-constrained sampling.
5featureMetadata:
6 status: ga
7 zdr:
8 eligibility: qualified
9 note: "Excludes [Covered Models](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements). Your prompts and Claude's outputs are not stored. Only the JSON schema is cached, for up to 24 hours since last use. This also covers strict tool use (`strict: true` on tools), which uses the same grammar pipeline."
10 supportedModels:
11 - claude-fable-5-1
12 - claude-mythos-5-1
13 - claude-fable-5
14 - claude-mythos-5
15 - claude-mythos-preview
16 - claude-opus-5-5
17 - claude-opus-5
18 - claude-sonnet-5-5
19 - claude-sonnet-5
20 - claude-haiku-5-5
21 - claude-haiku-4-5-20251001
22 - claude-opus-4-8
23 - claude-opus-4-7
24 - claude-opus-4-6
25 - claude-sonnet-4-6
26 - claude-opus-4-5-20251101
27 - claude-sonnet-4-5-20250929
28 supportedPlatforms:
29 Claude API: ga
30 Claude Platform on AWS: ga
31 Amazon Bedrock: ga
32 Amazon Bedrock (InvokeModel): ga
33 Claude Models on Google Cloud (Google managed): ga
34 Microsoft Foundry: ga
535---
636
737Setting `strict: true` on a tool definition guarantees Claude’s tool inputs match your JSON Schema by constraining the model’s token sampling to schema-valid outputs (a technique called grammar-constrained sampling). This page covers why strict mode matters for agents, how to enable it, and common use cases. For the supported JSON Schema subset, see [JSON Schema limitations](https://platform.claude.com/docs/en/build-with-claude/structured-outputs#json-schema-limitations). For non-strict schema guidance, see [Define tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools).
from line 1151
11211151
11221152Strict tool use is HIPAA eligible, but **protected health information (PHI) must not be included in tool schema definitions**. The API caches compiled schemas separately from message content, and these cached schemas do not receive the same PHI protections as prompts and responses. Do not include PHI in `input_schema` property names, `enum` values, `const` values, or `pattern` regular expressions. PHI should only appear in message content (prompts and responses), where it is protected under HIPAA safeguards.
11231153
1124For ZDR and HIPAA eligibility across all features, see [API and data retention](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention).
1125
11261154## Next steps
11271155
11281156<CardGroup cols={2}>
from line 1170
11421170 Specify tool schemas, write effective descriptions, and control when Claude calls your tools.
11431171 </Card>
11441172</CardGroup>
1173
1174## Availability
1175
1176Strict tool use is available on every model and eligible for HIPAA readiness.
1177
1178### API support
1179
1180#### [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages)
1181
1182* Availability: Available
1183
1184| Status | Cloud platforms | Models |
1185| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
1186| Available | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed), [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | [All models](https://platform.claude.com/docs/en/models/overview) |
1187
1188### Data handling
1189
1190[Data handling overview](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#feature-eligibility)
1191
1192| Item | Zero data retention | HIPAA |
1193| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1194| Status | Eligible (qualified; excludes [Covered Models](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements)) | Eligible |
1195| Details | Your prompts and Claude’s outputs are not stored. Only the JSON schema is cached, for up to 24 hours since last use. This also covers strict tool use (`strict: true` on tools), which uses the same grammar pipeline. [Learn more](https://platform.claude.com/docs/en/build-with-claude/structured-outputs#data-retention) | PHI must not be included in JSON schema definitions; see PHI handling guidelines. [Learn more](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#phi-handling-guidelines) |
1196
1197Applicable endpoints:
1198
1199* `/v1/messages`
11451200
No line in this hunk matches that.