What is Structured Tool Output?

2 min read Updated

Structured tool output is the typed result an MCP tool returns as a JSON object in the structuredContent field of a tools/call response, optionally validated against a JSON Schema the tool declares in its outputSchema field.

WHY IT MATTERS

An MCP tool result can carry unstructured content — a content array of text, image, audio, resource links, or embedded resources — and structured content, a JSON object in structuredContent. For backwards compatibility, the spec says a tool returning structured content SHOULD also include the serialised JSON in a text content block, so older clients still see something usable.

The companion field is outputSchema on the tool definition. If a tool declares one, servers MUST return structured results that conform to it, and clients SHOULD validate results against it. That contract is what makes structured output more than a formatting nicety:

  • Chaining — downstream tools, scripts, and agents can consume named, typed fields instead of parsing prose, which makes multi-step tool call pipelines reliable.
  • Validation — clients can reject malformed or unexpected results before they reach the model, catching server bugs and some classes of tampering.
  • Integration — typed results map cleanly onto programming-language types and documentation.

Typed results also give intermediaries a defined surface to inspect: when a result has a schema, response filtering can target specific fields (strip a credentials property, truncate a rows array) rather than regex-matching free text.

See structured tool output working in your own stack — route your MCP servers through PolicyLayer and every tool call is checked against policy before it runs.

GOVERN YOUR MCP SERVERS →

Enforced before the call runs. Nothing to install.

HOW POLICYLAYER USES THIS

PolicyLayer's gateway sees every tools/call result on its way back to the client. Where tools declare output schemas, results have predictable shape, which makes logging, auditing, and response-level policy more precise. The tool catalogue at policylayer.com/tools records declared schemas alongside each tool's risk classification.

FREQUENTLY ASKED QUESTIONS

What is the difference between content and structuredContent?
content is an array of unstructured blocks (text, images, audio, resource links); structuredContent is a single JSON object with typed fields. A tool may return both, and should mirror structured results into a text block for backwards compatibility.
Is outputSchema mandatory?
No, it is optional. But if a tool declares one, the server MUST return structured results conforming to it, and clients SHOULD validate results against it.
Why does structured output matter for agent pipelines?
Typed fields let downstream tools and code consume results directly instead of parsing free text, and let clients and gateways validate or filter specific fields before the result reaches the model.

FURTHER READING

Let agents act without letting them run wild.

Route your MCP servers through PolicyLayer and every tool call is checked against your policy before it runs — allow, deny, or require approval. Per-identity grants. Full audit log. Live in minutes.

Free to start. No card required.

43,000+ MCP servers and 220,000+ tools scanned and risk-classified.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.