gleamunison/mcp_session
MCP session layer: a live gleamunison session behind the JSON-RPC tools.
The session is immutable after boot: eval is read-only (define forms are
rejected), so handlers never thread state. Tools answer from the session’s
own definition table — names, kinds, content-addressed refs.
Types
pub opaque type SessionState
Values
pub fn handle_rpc(
state: SessionState,
body: String,
) -> mcp.Response
Route one JSON-RPC body through the protocol layer with the session’s real tools attached.
pub fn load_file(
state: SessionState,
path: String,
) -> Result(SessionState, String)
Extend a session by loading a lisp source file through the same
pipeline verify uses: defines are defined, other forms evaluated.