Summary
Following the specification issue modelcontextprotocol/modelcontextprotocol#1411, the Python SDK needs to ensure consistent handling of structuredContent vs content fields in tool responses.
Problem
Currently there's inconsistency across MCP implementations:
- Some clients use
structuredContent when available (e.g., Cursor)
- Others ignore it entirely
- This leads to different behavior with the same servers
Current SDK Behavior
The Python SDK needs to be reviewed to ensure it properly handles the relationship between structuredContent and content fields.
Required Changes
Once modelcontextprotocol/modelcontextprotocol#1411 is resolved, update the SDK to:
- Implement the specified client behavior for
structuredContent
- Ensure proper fallback to
content when needed
- Validate that servers populate both fields consistently
- Add tests to verify the correct behavior
- Ensure consistency with the TypeScript SDK implementation
References
cc: @dsp-ant
Summary
Following the specification issue modelcontextprotocol/modelcontextprotocol#1411, the Python SDK needs to ensure consistent handling of
structuredContentvscontentfields in tool responses.Problem
Currently there's inconsistency across MCP implementations:
structuredContentwhen available (e.g., Cursor)Current SDK Behavior
The Python SDK needs to be reviewed to ensure it properly handles the relationship between
structuredContentandcontentfields.Required Changes
Once modelcontextprotocol/modelcontextprotocol#1411 is resolved, update the SDK to:
structuredContentcontentwhen neededReferences
cc: @dsp-ant