Skip to content
BENIBIX Learn

MCP Structured Tool Output

AI🔌 MCPServer Features

Also known as structuredContent, MCP outputSchema, Structured Tool Output, Structured Content (MCP)

Tool results sent as neat data in a set shape. Code can read them.

Think of it like

It is like a shop receipt. It has a friendly note for you and neat rows of numbers for the till.

Example

A weather tool returns the text "It is 22 degrees". It also returns structuredContent with temperature 22, so the app can draw a chart.

Why it matters

Programs need data they can check, not sentences. A schema lets a client test the result before it uses it.

Definition

MCP structured tool output is data a tool returns in a set shape, not just as text. The tool can declare an output schema that says what that shape is. Its result then carries the data in a field called structuredContent. For older clients, the tool should also return the same data as text. Code can read the data straight away, with no guessing from words.

Example code

json
{
  "content": [{ "type": "text", "text": "{\"temp\": 22}" }],
  "structuredContent": { "temp": 22 }
}
The same answer twice: as text for older clients, and as data.
One result has two parts. One is text for the model, one is data for code.

Common mistake

Mixing it up with a model's structured output. This is data from a tool, not JSON written by the model.

Key takeaways

  1. 1
    A set shape. The output schema defines it.
  2. 2
    Data, not words. Code reads it without guessing.
  3. 3
    Text too. Older clients still get an answer.

Compare