~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

Unparseable MCP bodies get -32600, not the parse error -32700

Closed
Closed chadtmiller.com opened this issue 0 comments

What happened

a body that is not JSON is read as null, then answered -32600 Invalid Request with HTTP 200. JSON-RPC 2.0 defines -32700 Parse error for this. The test (assistants.rs:682) checks only a JSON value that is not a message.

How to see it

Read against docs/fresh at 4636e6d, the code at: crates/group-host/src/assistants.rs:749. Paths are under crates/group-host/src unless they say otherwise. Severity: low.

What you expected

Answer -32700 with a null id when from_slice fails, and keep -32600 for JSON that is not a message. Optionally answer HTTP 400, as MCP's streamable HTTP transport allows.

Where

The host, as built from 4636e6d. Found while checking the docs against the code.