A known method whose params do not deserialize is answered with -32601 Method not found
Maintainer antworten meist innerhalb von 2 Tagen
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- rust
- Bereich
- backend-api-design
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Rust
- Sterne
- 4k
- Forks
- 662
- Ø Merge
- 3 T. 13 Std.
- Gemergte PRs (30 T.)
- 35
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus modelcontextprotocol/rust-sdk
-
Streamable HTTP client: a 401 or 403 with a JSON-RPC error body and no WWW-Authenticate loses its HTTP statusEvtl. vergeben @aton-of-data hat das vor 6 Tagen übernommen. Offenbug P2 ready for work T-security T-transport
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
modelcontextprotocol/rust-sdk#1339 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
auth: refresh_token() requests offline_access that was never granted, so refreshes fail with invalid_scopeEvtl. vergeben @jstar0 hat das vor 8 Tagen übernommen. Offenbug P1 ready for work T-security T-transport
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
modelcontextprotocol/rust-sdk#1330 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
P3 question Stale T-documentation T-enhancement
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 86/100
modelcontextprotocol/rust-sdk#1155 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Streamable HTTP server answers a session-less non-initialize POST with 422, spec says 400Evtl. vergeben @connor4312 hat das heute übernommen. Offenbug P1 ready for work T-transport
modelcontextprotocol/rust-sdk#1376 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 2 Tagen
-
outputSchema is generated for the deserialize contract; tool results are serialisedEvtl. vergeben @connor4312 hat das heute übernommen. Offenbug P2 ready for work T-handler
modelcontextprotocol/rust-sdk#1374 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in modelcontextprotocol/rust-sdk
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
pop-os/cosmic-comp#2956 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
area:release criticality:p3 documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
registrystack/registry-stack#2085 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
libp2p/rust-libp2p#6694 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
EmbarkStudios/cargo-deny#910 ·