Skip to lesson

AnthropicClaude Certified Architect – Foundations2026-104.3 Enforce structured output using tool use and JSON schemas

Extracting Structured JSON using Claude and Tool Use

Completed by opening the official lab

Why it matters

Section 4.3 treats a tool’s input_schema as the output contract. This notebook is the plainest form of that pattern: the tool is never executed, and its input is the record you keep.

What to practise

Work through the five examples: article summarization, named entity recognition, sentiment scores, text classification and an open-ended schema. In each, define a tool whose input_schema describes the record, then take content.input from the tool_use block rather than parsing prose. Note that the first four leave the call to the model, while the last forces it with tool_choice={"type": "tool", ...} and an input_schema that allows any keys.

How it fits

Reading the record from the tool input is 4.3.1. None of the tools set strict: true, so compare them with the options in 4.3.2. The difference between leaving the call to the model and forcing it is 4.3.3’s routing choice, and a reply with no tool_use block is one of the failures 4.3.7 routes.