Home / Fixes

MCP error -32602: Structured content does not match the tool's output schema

Error: MCP error -32602: Structured content does not match the tool's output schema

What causes it

The server declares an outputSchema for the tool, then returns structuredContent that breaks it (a missing required property, or an extra property the schema forbids). The official MCP TypeScript SDK client validates results against that schema and turns the call into error -32602, so the agent gets an error even though the server sent data. In our runs: Epinu returned data missing the required "projects" property and, on another tool, an "auth" object with properties the schema did not allow; OOBE Protocol SAP returned results without the required "content" property. A close cousin is -32600 "has an output schema but did not return structured content" (Fluxink).

How to fix it

  1. Server authors: validate every tool result against its own outputSchema in tests, including error and empty cases, or drop outputSchema until the shape is stable.
  2. Return errors as isError results with text content instead of a partial structuredContent object that misses required fields.
  3. If a tool has an outputSchema, always include structuredContent, not only text.
  4. Client side: there is no safe workaround in the SDK short of skipping validation; report it to the server maintainer.

Where we hit it

All MCP fixes | Setup guides | Hit a different error? Request a test