modelcontextprotocol / modelcontextprotocol/python-sdk
Implement consistent structuredContent handling per specification clarification
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 24.3k
- フォーク
- 4k
- 平均マージ
- 1日 1時間
- マージ済み PR(30日)
- 31
説明
Summary
Following the specification issue modelcontextprotocol/specification#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
structuredContentwhen 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/specification#1411 is resolved, update the SDK to:
- Implement the specified client behavior for
structuredContent - Ensure proper fallback to
contentwhen needed - Validate that servers populate both fields consistently
- Add tests to verify the correct behavior
- Ensure consistency with the TypeScript SDK implementation
References
- Specification issue: modelcontextprotocol/specification#1411
- TypeScript SDK issue: modelcontextprotocol/typescript-sdk#911
- Discord discussion: https://discord.com/channels/1358869848138059966/1411057080902746293
cc: @dsp-ant
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず仕様 issue modelcontextprotocol/specification#1411 と、リンクされている TypeScript SDK issue を読み、それらがこの Python SDK が一致させるべき動作を定義していることを確認してください。次に、Python のクライアントおよびサーバーのレスポンス処理を特定し、明確化された structuredContent の動作に対するテストを追加してください。指定されたフォールバックを実装し、サーバーのフィールドの一貫性を検証し、TypeScript SDK と一致させれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python, typescript
- 領域
- api, backend-api-design
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100