Proposal: expose tool-contract pinning helpers (verify a server's tool surface hasn't drifted between sessions)
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Funcionalidade
- Clareza
- Precisa de esclarecimento
- Status de atividade
- Ativa
- Stack de tecnologia
- java
- Domínio
- developer-experience
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.)
- Linguagem predominante
- Java
- Estrelas
- 3.8k
- Forks
- 1.1k
- Merge médio
- 1d 3h
- PRs com merge (30d)
- 38
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de modelcontextprotocol/java-sdk
-
Modern `HttpServletMcpTransport` does not check `Mcp-Name` when `params.name` or `params.uri` is not a JSON stringTalvez já em andamento @starryeye assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
modelcontextprotocol/java-sdk#1352 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Unknown tool error always says "Unknown tool: invalid_tool_name" instead of the name that was calledAberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
modelcontextprotocol/java-sdk#1346 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
modelcontextprotocol/java-sdk#1345 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Tool result _meta is lost when the server automatically adds text content for structured outputAbertaarea/server legacy P3
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
modelcontextprotocol/java-sdk#1330 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Client request handlers that complete empty send no JSON-RPC responseTalvez já em andamento @1fanwang assumiu há 83 dias. Abertaarea/client bug P2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
modelcontextprotocol/java-sdk#1124 · 6 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de modelcontextprotocol/java-sdk
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
-
crash
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
-
account bug course exam iris lecture
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia