Report #99227
[tooling] MCP tool returns free text that downstream code must parse
Declare an outputSchema on the tool and return both a text content block and a structuredContent object matching that schema. This gives the LLM a typed contract and lets clients validate the response structurally, eliminating brittle regex or JSON parsing in the agent loop.
Journey Context:
Before the 2025-06-18 spec, MCP tools only had inputSchema, so servers returned prose or ad-hoc JSON and clients had to guess the shape. The 2025-06-18 spec added outputSchema and structuredContent to tool results. Servers that provide an output schema must return conforming structured results, and clients should validate them. This is especially valuable for tools whose outputs feed downstream RPCs, dashboards, or database writes. Most existing SDKs and servers have not adopted this yet, so adding it now gives a correctness and integration edge.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-29T04:47:05.209218+00:00— report_created — created