After Amazon Bedrock made Claude structured outputs generally available on October 20, how should you write JSON Schema in output_config.format and strict tools?

As of 22 October 2026: Bedrock ships Claude structured outputs on runtime and mantle. InvokeModel passes a json_schema object in output_config.format; mantle tools use strict true. Every object needs additionalProperties false; read stop_reason before JSON.parse.

The October 20 change moves Claude structured outputs on Amazon Bedrock to general availability on both bedrock-runtime and bedrock-mantle. Text answers use output_config.format with type: json_schema and a nested schema object, not a string. Agent tools on mantle add strict: true beside input_schema. Tokens are constrained during generation, but the response is not always business-ready JSON: read stop_reason for end_turn, max_tokens, or a safety refusal before you JSON.parse.

This piece is written for 22 October 2026, from the AWS blog and product posts of 19–20 October. Yesterday we covered which usage fields matter for 12-hour Responses caching. Changing a schema there changes the cache prefix; on Bedrock, changing schema structure recompiles the grammar, while description-only edits usually keep the 24-hour cache.

What October 20 actually shipped

The announcement says structured outputs are available for every Anthropic Claude model where the model runs, through boto3 on bedrock-runtime and through the Messages API on bedrock-mantle. Both paths return JSON that matches your declared shape instead of free text you scrape later.

MechanismRequest fieldsTypical use
JSON Schema output formatoutput_config.format with type: json_schema and schemaTicket extraction, contract fields, report rows
Strict tool usestrict: true on the tool plus input_schemaMulti-step agents and function arguments

Bedrock uses constrained decoding so tokens cannot leave the schema. That is a different cost model from generate-then-validate with retries. Batch inference, cross-Region inference on runtime, and streaming typed events are also in scope.

bedrock-runtime: InvokeModel with a schema

InvokeModel still takes the Anthropic-native JSON body. Set anthropic_version to bedrock-2023-05-31. Put the schema under output_config.format as an object, not a string wrapper.

{
  "anthropic_version": "bedrock-2023-05-31",
  "max_tokens": 512,
  "messages": [
    {"role": "user", "content": "Paulo Santos (paulo@example.com) wants Enterprise pricing and a demo next Tuesday at 2pm."}
  ],
  "output_config": {
    "format": {
      "type": "json_schema",
      "schema": {
        "type": "object",
        "properties": {
          "name": {"type": "string"},
          "email": {"type": "string"},
          "plan_interest": {"type": "string"},
          "demo_requested": {"type": "boolean"}
        },
        "required": ["name", "email", "plan_interest", "demo_requested"],
        "additionalProperties": false
      }
    }
  }
}

Every object needs additionalProperties: false or Bedrock rejects the schema. Clear property names and descriptions steer extraction; use enum for fixed labels instead of filtering in application code.

bedrock-mantle: strict tool parameters

Mantle targets agents with server-side tools and stateful threads. With strict: true, each tool_use input must match input_schema exactly: no extra keys and no strings outside enum lists.

{
  "name": "get_weather",
  "description": "Current weather for a location",
  "strict": true,
  "input_schema": {
    "type": "object",
    "properties": {
      "location": {"type": "string"},
      "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}
    },
    "required": ["location", "unit"],
    "additionalProperties": false
  }
}

JSON Schema output governs type: text payloads. Strict tools govern type: tool_use input objects. One workflow may emit both; log them under separate contracts.

From response body to valid JSON

Read the InvokeModel body with json.loads, then branch on stop_reason:

  • end_turn: take the type: text block and JSON.parse its text string.
  • max_tokens: the JSON may be truncated; raise max_tokens and retry.
  • Safety refusals: there may be no conforming text block; do not assume parse success.
{
  "stop_reason": "end_turn",
  "content": [
    {
      "type": "text",
      "text": "{\"name\":\"Paulo Santos\",\"email\":\"paulo@example.com\",\"plan_interest\":\"Enterprise\",\"demo_requested\":true}"
    }
  ]
}

After parse, a second JSON Schema check still helps catch downstream merges. Bedrock guarantees the model side against your submitted subset, not objects after your app adds defaults.

  • JSON Validator — confirm the text block is valid JSON.
  • JSONPath — pull $.content[?(@.type=='text')].text from batches.
  • JSON Diff — see whether the schema or the input changed between runs.

Schema subset and additionalProperties

Bedrock validates against a JSON Schema Draft 2020-12 subset: objects, arrays, primitives, enum, const, limited anyOf/allOf, internal $ref, and some string format values.

Unsupported features include recursive schemas, external $ref, numeric bounds, string length bounds, and any additionalProperties value other than false. Arrays allow only minItems 0 or 1. Start with the minimum required fields; heavy nesting slows the first compile and grows Converse payloads because the schema counts toward size limits.

Grammar compile and 24-hour cache

The first request with a new schema compiles a grammar artifact, so latency can spike once. Bedrock caches compiled grammars per account for 24 hours. Description-only edits usually reuse the cache; structural edits invalidate it.

Reuse stable schema templates in code and keep variable instructions in messages. That mirrors keeping a stable prefix on the direct Claude API, except Bedrock caches grammar rather than OpenAI-style KV prefixes.

FAQ

Is output_config on InvokeModel the same as the direct Claude API?

The path output_config.format with json_schema matches, but Bedrock uses the InvokeModel native body and anthropic_version. The direct API moved off legacy output_format in 2026. Both require additionalProperties false; error envelopes still differ by gateway.

Why must every object set additionalProperties to false?

Bedrock rejects schemas otherwise. The rule closes the object to unknown keys so the model cannot add fields outside your contract.

Can I trust JSON when stop_reason is max_tokens?

No. AWS documents truncation as non-conforming output. Increase max_tokens or shrink the schema and prompt, then retry.

Does editing a property description recompile the grammar?

Usually not. AWS says name and description edits keep the cached grammar; structural JSON changes trigger a fresh compile.

How do json_schema output and strict tools divide work?

json_schema shapes final text JSON for users or downstream systems. strict shapes tool_use inputs. Agents may call strict tools first and json_schema last; version the two schemas separately.

Can I delete every JSON.parse call now?

No. You still parse the outer body, extract text, and parse the inner string. Refusals and truncation still fail. Structured output removes schema drift from free text, not every parser exception.

Summary

October 20 makes the JSON contract first-class for Claude on Bedrock. Use output_config.format on runtime and strict tools on mantle; close objects with additionalProperties: false; test real tickets against all three stop_reason paths before launch.

Archive modelId, schema version, stop_reason, and a hash of the parsed object when you compare with Sonnet 5.5 tools on the direct API.