Implements the non-object output portion of SEP-2106 for the MCP Spec 2026-07-28 release.
Tracked by umbrella #337.
Spec summary
outputSchema fully drops the object-only restriction and accepts arrays/primitives/compositions. structuredContent widens from {[key:string]: unknown} to unknown, validated by outputSchema.
PHP SDK changes
- The
outputSchema path (today the formatters in src/Capability/Formatter/) must accept array/scalar return types without object wrapping.
- Ensure
structuredContent serialization handles non-object roots.
- Continue emitting the back-compat
TextContent mirror when output is array/primitive (verify against spec).
- Client-side:
Mcp\Client tool-listing types currently assume object-shaped structured content — relax type narrowing.
Related
Implements the non-object output portion of SEP-2106 for the MCP Spec 2026-07-28 release.
Tracked by umbrella #337.
Spec summary
PHP SDK changes
outputSchemapath (today the formatters insrc/Capability/Formatter/) must accept array/scalar return types without object wrapping.structuredContentserialization handles non-object roots.TextContentmirror when output is array/primitive (verify against spec).Mcp\Clienttool-listing types currently assume object-shaped structured content — relax type narrowing.Related