Proposal: expose tool-contract pinning helpers (verify a server's tool surface hasn't drifted between sessions)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
- Stack tecnológico
- java
- Área
- developer-experience
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.)
- Lenguaje dominante
- Java
- Estrellas
- 3.8k
- Forks
- 1.1k
- Merge medio
- 1 d 3 h
- PR fusionados (30 d)
- 38
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de modelcontextprotocol/java-sdk
-
Modern `HttpServletMcpTransport` does not check `Mcp-Name` when `params.name` or `params.uri` is not a JSON stringPosiblemente ocupada @starryeye la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
modelcontextprotocol/java-sdk#1352 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Unknown tool error always says "Unknown tool: invalid_tool_name" instead of the name that was calledAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
modelcontextprotocol/java-sdk#1346 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
modelcontextprotocol/java-sdk#1345 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Tool result _meta is lost when the server automatically adds text content for structured outputAbiertoarea/server legacy P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
modelcontextprotocol/java-sdk#1330 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Client request handlers that complete empty send no JSON-RPC responsePosiblemente ocupada @1fanwang la tomó hace 83 días. Abiertoarea/client bug P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
modelcontextprotocol/java-sdk#1124 · 6 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de modelcontextprotocol/java-sdk
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
crash
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
account bug course exam iris lecture
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día