What's the difference between tool calling and structured output?
Tool calling is the model choosing, mid-response, to invoke a function and get a real result back before it keeps generating; structured output is a constraint on the model’s final answer, forcing whatever it was already going to say into JSON that matches a schema, with no function run and no result returned. Structured output happens once, at the end. Tool calling can happen zero, one, or many times in the middle of a single response, each call pausing generation to run something external and feed the actual result back in before the model continues.
They’re not competing choices. A tool’s own arguments are usually defined with the same kind of schema structured output enforces on a final answer, and many APIs let you require structured output on the model’s response after every tool call finishes, so a single request can use both. Neither guarantees the value returned is correct, just that it’s shaped right, the same gap between a valid answer and a right one that shows up whenever a schema is doing the checking instead of a person.