Skip to main content

Module rpc

Module rpc 

Source
Expand description

JSON-RPC 2.0 / MCP tools/call parsing. Total: never panics on arbitrary bytes (property-tested), returns typed errors for every malformed shape.

Structs§

ToolCallRequest
A parsed MCP tool-call request.

Enums§

RpcError
Parse failures.

Constants§

MAX_JSON_DEPTH
Depth bound applied post-parse (deeply nested JSON as a DoS vector).
MAX_PAYLOAD_BYTES
Hard byte bound applied before parsing (attacker-controlled input).

Functions§

authorization_error
Build the JSON-RPC error response for a blocked call (the “immediate authorization error back to the agent loop” from the brief).
parse_tool_call
Parse raw bytes as an MCP tools/call.