What is Structured output?
Structured output is machine-readable data returned in a defined shape, such as JSON validated against a schema, so a program or agent can parse it reliably instead of scraping free-form text.
Structured output is the practice of having a model or tool return data in a predictable, parseable form rather than as prose. In the Model Context Protocol, a tool can declare an output schema and return structuredContent alongside (or instead of) plain text, so the calling agent gets a typed object it can program against, the same idea many LLM APIs expose as JSON mode or schema-constrained decoding. The benefit is reliability: when a tool's result is guaranteed to be valid JSON matching a known shape, downstream code can branch on fields, chain the result into the next tool call, or surface it in a UI without brittle string parsing. It also reduces ambiguity for the model itself, since a schema tells it exactly which fields to produce. Glen leans on this pattern internally, every LLM call in its pipeline requests a JSON object and runs it through a validator that rejects off-schema responses, and its MCP tool returns recalled context inside a structured envelope so the agent receives the same payload every time. Structured output and free-form text are not mutually exclusive; a well-designed tool often returns both a human-readable summary and the structured data behind it.