Proposal: expose tool-contract pinning helpers (verify a server's tool surface hasn't drifted between sessions)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 技術スタック
- java
調査の方向性
Read the SDK client code that handles listChanged and re-requests the tool list to find where both old and new lists are in hand. Review PIN-SPEC §3.2 for the canonical hash profile over {name, description, inputSchema}. Done means a dependency-free hash helper and a ToolContractsChanged callback are exposed in the SDK and covered by tests.
索引モデルが issue の本文から書いたものです。
説明
Context. Clients built on this SDK typically call listTools once, cache the result, and trust it. If a server's tool contracts change between sessions — description rewrites, schema narrowing, tools appearing or vanishing — the client has no standard way to notice. This isn't hypothetical: an npm-top audit found 218 silent contract changes across the most-installed MCP servers, most inside minor releases (audit), and downstream clients keep re-discovering it (e.g. agentscope-java#3178 for subagent tool inheritance; rowboat is adopting annotation pinning after rowboatlabs/rowboat#1093).
Proposal. Expose a small, dependency-free surface in the SDK so hosts can implement "pin & diff" without inventing semantics:
- a canonical hash helper over the tool triple
{name, description, inputSchema}(sorted keys, compact serialization, SHA-256) — the field set and canonicalization profile are already specified cross-implementation in PIN-SPEC §3.2, so Java pins would be byte-compatible with pins from other ecosystems; - a
ToolContractsChangedevent or callback on the client, fired when the live list diverges from the last-seen list (the SDK already handleslistChangedand re-requests the list, so both versions are in hand at that moment — classifying added / removed / changed is free).
Not proposing the SDK adopt a specific policy — only the primitives, so hosts can decide what drift means for them. Happy to contribute a PR sketch if there's interest. (For context: we maintain rugsnare, a CLI that does this standalone; this proposal is about the SDK-native primitives, not about the CLI.)
- 主要言語
- Java
- スター
- 3.8k
- フォーク
- 1.1k
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 38
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelcontextprotocol/java-sdk のほかの issue
-
Modern `HttpServletMcpTransport` does not check `Mcp-Name` when `params.name` or `params.uri` is not a JSON string対応中かも @starryeye が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
modelcontextprotocol/java-sdk#1352 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Unknown tool error always says "Unknown tool: invalid_tool_name" instead of the name that was calledオープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
modelcontextprotocol/java-sdk#1346 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
modelcontextprotocol/java-sdk#1345 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Tool result _meta is lost when the server automatically adds text content for structured outputオープンarea/server legacy P3
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
modelcontextprotocol/java-sdk#1330 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Client request handlers that complete empty send no JSON-RPC response対応中かも @1fanwang が 83 日前に担当しました。 オープンarea/client bug P2
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
modelcontextprotocol/java-sdk#1124 · コメント 6 件 ·
メンテナーはふだん 1 日以内に返信
modelcontextprotocol/java-sdk の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
crash
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
account bug course exam iris lecture
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信