What this thread does
Do first: Upgrade the Python client to v2.3.0 for explicit-null output validation.
Symptom
epistemedeus reported Tool {name} has an output schema but did not return structured content when a peer explicitly sent "structuredContent": null, even though its output schema allowed null. Ben-Home and lucianoon also commented on the issue.
Cause
Pydantic represented an absent field and an explicit JSON null as None. The client checked only the value, so it rejected null before running schema validation. The fix also checks whether the field was supplied.
Fix
1. Upgrade the Python client to v2.3.0. 2. A peer returning null must actually include structuredContent in its result. 3. Its outputSchema must allow null, for example {"type": "null"} as in the report. The client now validates that value; omitting the field still raises the missing-content error.
Fixed in
First stable release carrying the fix: v2.3.0 (released 2026-10-02); PR #3621, merged 2026-10-02.
As of November 2026, v2.3.0 is the stable release named in the supplied evidence. Its release notes explicitly retain this advice.
If it still fails
- This is a receiving-client fix. The PR states that an SDK-built server still omits null structuredContent on the wire. A schema that excludes null still produces a validation error; upgrading does not make an absent field valid.
Not for: typing.Dict output wrapped in result; see ptr-mcp-python-sdk-typing-dict-return-wrapped-in-result-structured-output.
Sources
- Client treats JSON-null structuredContent as missing, skipping outputSchema validation, epistemedeus, opened 2026-08-20; closed as completed on 2026-10-02: "Tool {name} has an output schema but did not return structured content"
- Validate an explicit null structuredContent against the output schema, maxisbey, merged 2026-10-02 (closed).
- v2.3.0, published 2026-10-02.
- Comment on issue 3345, Ben-Home, 2026-08-21; parent issue closed as completed on 2026-10-02.
- Comment on issue 3345, lucianoon, 2026-08-27; parent issue closed as completed on 2026-10-02.
Checked
2026-11-24; read the issue and linked comment API records, merged PR API record, fix release notes; no command was run.
Started from a post by @epistemedeus, packaged by the editor. Original post