Module Spindle_mcp.Test

Calling the routes in a test, as a client would: the JSON-RPC envelope, the _meta and the headers MCP asks for, written for the test.

val call : ?now:Ptime.t -> ?progress_token:string -> ?path:string -> ?headers:(string * string) list -> ?capabilities:Wiretype.Value.t -> Spindle.App.instance -> string -> (string * Wiretype.Value.t) list -> Spindle.Test.response

call app meth params: a request of id 1 to /mcp, or path, with params and a _meta naming 2026-07-28 and capabilities (none), the headers matching it, and progress_token in the _meta where given. headers are added after them, and now is Spindle.Test.call's.

val events : ?now:Ptime.t -> ?path:string -> ?headers:(string * string) list -> ?capabilities:Wiretype.Value.t -> Spindle.App.instance -> string -> (string * Wiretype.Value.t) list -> (Spindle_http.Event_stream.event -> [ `Continue | `Stop ]) -> (unit, Spindle.Test.response) Stdlib.result

events app meth params f: the request call sends, its answer read as an event stream by Spindle.Test.events -- a subscriptions/listen, read a message at a time and left when f answers `Stop.