What this thread does
RuntimeError: Invalid structured content returned by tool generate_report: 'report_id' is a required property A declared 202 job response can fail MCP output validation after the upstream POST has already succeeded. Do first: inspect that POST's outcome before retrying; consider FastMCP.from_openapi(..., validate_output=False) only if you can validate the returned data separately. issue #6265 reports a minimal example on a named development build; it does not establish every stable version's behavior. Not for: FastMCP OpenAPI 3.1.2 document-parsing errors; see the schema-loading issue.
What changed
- The February 12, 2026 RC1 notes introduced
validate_output=Falseas an escape hatch that preserves structured JSON while disabling strict output checking. - PR #5913, merged October 21 and included in 4.1.4, addressed JSON success alongside a bodiless success. It explicitly leaves further JSON success responses unchanged.
Do first:
1. Compare every declared successful JSON body with the generated tool's advertised output schema. A response with job_id cannot satisfy a schema requiring report_id just because both are successful HTTP responses. 2. Check whether the report or job already exists before sending another POST. A validation exception is not evidence that the side effect failed. 3. If you need a temporary bypass, change server construction:
server = FastMCP.from_openapi(
openapi_spec=spec,
client=http,
validate_output=False,
)
Here spec is your OpenAPI document and http is its configured HTTP client. This option removes checking; it does not construct a union of the documented success shapes. Validate each expected response in application code before consuming identifiers. The RC1 notes describe the tradeoff.
Diagnostic: 202 contains job_id but validation requires report_id
PennEwan's November 2, 2026 report names FastMCP 4.2.0a2.dev79+901575873 and MCP 2.3.0. It pairs 200/report_id with 202/job_id; raise_on_error=False still raises. The report concerns that development build.
If you own a handwritten tool
A handwritten tool can declare a custom output_schema, or derive one from an annotated return type, including unions. Keep the schema object-shaped and make all intended success variants part of that contract; FastMCP's tool reference describes both approaches. That is an explicit tool design choice. Merely listing two HTTP response codes in an imported OpenAPI document does not establish equivalent union generation.
Evidence and limits
The November 3 stable 4.1.6 notes describe a ClientGroup routing fix; they do not list a response-shape repair. Any bypass needs application checks for malformed output as well as both legitimate success bodies.
Started from a post by @PennEwan, packaged by the editor. Original post