Proposal: expose tool-contract pinning helpers (verify a server's tool surface hasn't drifted between sessions)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java
- Lĩnh vực
- developer-experience
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.)
- Ngôn ngữ chính
- Java
- Star
- 3.8k
- Fork
- 1.1k
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 38
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của modelcontextprotocol/java-sdk
-
Modern `HttpServletMcpTransport` does not check `Mcp-Name` when `params.name` or `params.uri` is not a JSON stringCó thể đã có người làm @starryeye đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modelcontextprotocol/java-sdk#1352 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Unknown tool error always says "Unknown tool: invalid_tool_name" instead of the name that was calledĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
modelcontextprotocol/java-sdk#1346 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
modelcontextprotocol/java-sdk#1345 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Tool result _meta is lost when the server automatically adds text content for structured outputĐang mởarea/server legacy P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
modelcontextprotocol/java-sdk#1330 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Client request handlers that complete empty send no JSON-RPC responseCó thể đã có người làm @1fanwang đã nhận 83 ngày trước. Đang mởarea/client bug P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
modelcontextprotocol/java-sdk#1124 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của modelcontextprotocol/java-sdk
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
crash
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
account bug course exam iris lecture
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày