Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

A known method whose params do not deserialize is answered with -32601 Method not found

オープン
#1,347 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

bug P1 ready for work T-handler T-model

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.

主要言語
Rust
スター
4k
フォーク
662
平均マージ
3日 19時間
マージ済み PR(30日)
35

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

modelcontextprotocol/rust-sdk のほかの issue

modelcontextprotocol/rust-sdk の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。