Asking a model for JSON in the prompt gets JSON most of the time. Most of the time is a problem when the output feeds a parser in production, because the failure mode is a trailing comma at three in the morning.
Structured outputs solve this at the decoding layer rather than the prompt layer. The schema is compiled into a state machine, and at every step the sampler masks out any token that would make the output invalid. A closing brace becomes the only legal token when the object is complete. The model still chooses the content, and it cannot choose malformed syntax.
This differs from tool calling in intent even though the mechanism overlaps. Tool calling asks which function to invoke with what arguments. Structured outputs shape the model's own answer, which is what extraction, classification, and form-filling actually need.
The remaining risk is semantic. Constrained decoding guarantees the shape of the response, and it guarantees nothing about whether the values are right. Field-level validation still belongs downstream.

