Empty cacheScope on tools/list drops every tool
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
まず、tools/list と resources/read の結果型における cacheScope の serde デシリアライズから始め、次に提供された JSON を対象を絞ったテストとして再現します。空文字列そのものが省略されたフィールドとして扱われ、tools が引き続き利用可能で、"shared" や " " のような値は引き続き失敗すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
Some hosted MCP servers send cacheScope: "" on tools/list and resources/read results. SEP-2549 only allows "public", "private", or omitting the field, so serde rejects the empty string. Because ServerResult is an untagged enum, that failure does not stay on ListToolsResult. The payload falls through to CustomResult, and the client ends up with no tools.
Negative ttlMs is already normalized. Empty cacheScope is not.
To Reproduce
Deserialize a valid tools/list result that includes an empty cache scope:
{
"tools": [{ "name": "search", "inputSchema": { "type": "object" } }],
"ttlMs": 0,
"cacheScope": ""
}
On current main this does not parse as ListToolsResult.
Expected behavior
Treat an exact empty cacheScope the same as an omitted field (None). Unknown values such as "shared" or " " should still fail.
Additional context
I hit this against a hosted server that emits cacheScope: "" on an otherwise valid tools/list body. The tools were present on the wire and disappeared after decode.
- 主要言語
- Rust
- スター
- 3.9k
- フォーク
- 645
- 平均マージ
- 4日 22時間
- マージ済み PR(30日)
- 37
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelcontextprotocol/rust-sdk のほかの issue
-
streamable-http server: a supplied Mcp-Method contradicting an initialize body is silently accepted オープンbug P1 ready for work T-transport
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
modelcontextprotocol/rust-sdk#1271 ·
-
P3 question T-documentation T-enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
modelcontextprotocol/rust-sdk#1155 ·
-
bug P1 ready for work T-model T-service
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
modelcontextprotocol/rust-sdk#1283 · コメント 1 件 ·
-
bug P0 ready for work T-security T-transport
modelcontextprotocol/rust-sdk#1272 · 担当者 1 名 ·
-
bug P1 ready for work T-security T-transport
modelcontextprotocol/rust-sdk#1268 · リアクション 1 件 · 担当者 1 名 ·
modelcontextprotocol/rust-sdk の issue をすべて見る
似ている issue
-
bug github_actions
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
registrystack/registry-stack#1393 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
rocky-data/rocky#2181 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. オープンbot:ai-assisted component:indexer QA-roadmap status:untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
midnightntwrk/midnight-indexer#1557 ·