A known method whose params do not deserialize is answered with -32601 Method not found
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- backend-api-design
Direzione di ricerca
Start by reading the ClientRequest untagged enum and the default on_custom_request handler described in the issue; compare how typed request deserialization failures reach that handler with how unknown methods are handled. Check the existing request error tests and add cases for the malformed tools/call, prompts/get, and resources/read params. Done means known methods with invalid params return -32602, while an unknown method still returns -32601.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
When a request names a standard method but its params do not fit that method's type, the server answers -32601 with the method name as the message. The client is told the server has no tools/call, when the problem is in its own arguments.
To Reproduce (main at 808124b, also 3.5.1; stdio, after a 2025-11-25 handshake, server built with #[tool_router] / #[prompt_router])
| request | response |
|---|---|
tools/call, no params |
-32601 tools/call |
tools/call, params: {} |
-32601 tools/call |
tools/call, params: {"name": 7, "arguments": {}} |
-32601 tools/call |
tools/call, params: {"name": "ok", "arguments": "x"} |
-32601 tools/call |
prompts/get, params: {"name": 7} |
-32601 prompts/get |
resources/read, params: {"uri": 7} |
-32601 resources/read |
fixture/unknown (control) |
-32601 fixture/unknown |
On 2026-07-28 the rows that carry params behave the same; the row without params is correctly answered with -32602 for the missing _meta.
Why
ClientRequest is #[serde(untagged)]. When the typed variant for the method fails, the message falls through to CustomRequest, and the default on_custom_request returns METHOD_NOT_FOUND. Same shape as #1345, one level down.
Expected behavior
-32602 Invalid params when the method is one the SDK defines and its params do not deserialize. The tools page lists "Malformed requests (requests that fail to satisfy CallToolRequest schema)" under protocol errors, and the Go, Python and TypeScript 2.x SDKs answer these requests with -32602.
Related, smaller
A request whose params is not an object ("params": []) is answered with {"jsonrpc":"2.0","error":{"code":-32600,"message":"Invalid request"}}. The response has no id member, although the request's id was readable, so the sender cannot match it. I can split this into its own issue if you prefer.
I can send a PR for the first part.
AI disclosure: investigated and drafted with Claude Code; I reviewed it.
- Lingua principale
- Rust
- Stelle
- 4k
- Fork
- 662
- Merge medio
- 3g 10h
- PR unite (30g)
- 33
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun 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/rust-sdk
-
Streamable HTTP client: a 401 or 403 with a JSON-RPC error body and no WWW-Authenticate loses its HTTP statusForse già presa @aton-of-data l’ha presa 2 giorni fa. Apertabug P2 ready for work T-security T-transport
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
modelcontextprotocol/rust-sdk#1339 ·
I maintainer di solito rispondono entro 3 giorni
-
rmcp and rmcp-macros crates no longer include LICENSE (regression since 1.3.0)Forse già presa @Steeve-Crypto l’ha presa 2 giorni fa. Apertabug P2 ready for work T-config
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
modelcontextprotocol/rust-sdk#1335 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
auth: refresh_token() requests offline_access that was never granted, so refreshes fail with invalid_scopeForse già presa @jstar0 l’ha presa 5 giorni fa. Apertabug P1 ready for work T-security T-transport
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
modelcontextprotocol/rust-sdk#1330 ·
I maintainer di solito rispondono entro 3 giorni
-
P3 question Stale T-documentation T-enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
modelcontextprotocol/rust-sdk#1155 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
A request whose `id` is not an i64 or a string is parsed as a notificationForse già presa @talhayme l’ha presa 1 giorno fa. Apertabug P1 ready for work T-core T-model
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
modelcontextprotocol/rust-sdk#1345 ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di modelcontextprotocol/rust-sdk
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
-
state:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
scanaislop/aislop#482 ·
I maintainer di solito rispondono entro 1 giorno
-
docs(skills): issue-first should reference an existing Linear ticket instead of filing a duplicateApertadocumentation
Difficoltà 1/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
chatmail/core#8824 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno