Spindle_mcp_protocolThe Model Context Protocol's messages, as both ends read and write them: JSON-RPC 2.0 as MCP 2026-07-28 uses it, and the protocol's version. It does no I/O, so the server and the client read one message one way.
A request's id: MCP's are a string or an integer, never null.
val id_to_value : id -> Wiretype.Value.ttype message = | Request of {id : id;meth : string;params : Wiretype.Value.t option;}| Notification of {}A message a client sends.
member name params: that member of an object, where there is one.
val result : id -> (string * Wiretype.Value.t) list -> stringA result response: the members given, in order.
notification meth params: a message no answer follows.
module Code : sig ... endThe codes MCP answers with: JSON-RPC's -32700, -32600, -32601, -32602 and -32603, and MCP's own -32020, -32021 and -32022.
val error : ?id:id -> ?data:Wiretype.Value.t -> int -> string -> stringAn error response: the code, the message, and data where given. id is the request's, and absent where it could not be read.