Proposal: expose tool-contract pinning helpers (verify a server's tool surface hasn't drifted between sessions)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- java
- Ambito
- developer-experience
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.)
- Lingua principale
- Java
- Stelle
- 3.8k
- Fork
- 1.1k
- Merge medio
- 1g 3h
- PR unite (30g)
- 38
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di modelcontextprotocol/java-sdk
-
Modern `HttpServletMcpTransport` does not check `Mcp-Name` when `params.name` or `params.uri` is not a JSON stringForse già presa @starryeye l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
modelcontextprotocol/java-sdk#1352 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Unknown tool error always says "Unknown tool: invalid_tool_name" instead of the name that was calledAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
modelcontextprotocol/java-sdk#1346 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
modelcontextprotocol/java-sdk#1345 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Tool result _meta is lost when the server automatically adds text content for structured outputApertaarea/server legacy P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
modelcontextprotocol/java-sdk#1330 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Client request handlers that complete empty send no JSON-RPC responseForse già presa @1fanwang l’ha presa 83 giorni fa. Apertaarea/client bug P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
modelcontextprotocol/java-sdk#1124 · 6 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di modelcontextprotocol/java-sdk
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
crash
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
account bug course exam iris lecture
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno