Skip to main content

parse_request

Function parse_request 

Source
pub fn parse_request(body: &[u8]) -> Option<ParsedRequest>
Expand description

Parses a single JSON-RPC request frame from a POST body.

Returns None for notifications (no id — nothing to meter against), for batch arrays (forbidden since MCP spec rev 2025-06-18; passed through and metered generically by the caller) and for unparseable bodies.