🔌MCP Structured Tool Output
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
Example code
json
{
"content": [{ "type": "text", "text": "{\"temp\": 22}" }],
"structuredContent": { "temp": 22 }
}Common mistake
Key takeaways
- 1A set shape. The output schema defines it.
- 2Data, not words. Code reads it without guessing.
- 3Text too. Older clients still get an answer.