Report #100176
[tooling] How do I make MCP tool outputs reliably parseable by downstream agents?
Declare an outputSchema in tools/list and return the matching payload in the structuredContent field of the tool result, while also mirroring the serialized JSON in a TextContent block for backwards compatibility. Do not make agents guess the response shape from prose or call the tool once just to discover it.
Journey Context:
Without outputSchema, the model has to call a tool, read the free-text result, and infer how to use the fields, which adds rounds and brittle parsing. The 2025-06-18 spec lets servers advertise output schemas and return typed structuredContent; clients SHOULD validate against the schema. Some hosts still do not expose outputSchema to the model catalog, but structuredContent still round-trips as a typed object. Backwards compatibility matters: older clients may ignore structuredContent, so include the JSON text as well. This is especially valuable for chained tool calls and when another program consumes the result.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-01T04:47:03.315059+00:00— report_created — created