Expand description
The MCP server at {base}/mcp: Streamable HTTP without sessions or a stream, JSON-RPC in and JSON out. Every tool is a read of the HTTP API, made with the caller’s own credentials, so the MCP server can see exactly what the token can and nothing more.
Structs§
- McpError
- A JSON-RPC error:
codeis the error’s own JSON-RPC code (-32602 for an unknown tool), answered with its message as it is;Noneis an error thrown along the way (an API read that failed, a body ofnull), which the MCP server answers as -32603 “Internal error” and the assistant hands the model as its message. - Tool
- One tool.
- Tool
Request - The API path and query a tool reads.
Constants§
- INSTRUCTIONS
- What the MCP server tells a client about Runlight, and the assistant’s system prompt starts with.
- MAX_
BATCH - The most messages one batch may hold.
- PROTOCOL_
VERSIONS - Newest first; a client asking for one we do not know is answered with the newest.
Statics§
- TOOLS
- The tools, in the order
tools/listgives them.
Traits§
- ApiRead
- Reads one API path with the caller’s credentials: the path (such as
/api/stats) and the query’s name and value pairs, in order.
Functions§
- call_
tool - Runs one tool by name, as the MCP server does; the dashboard’s assistant
calls it too.
paramsholdsnameandarguments. An unknown tool is an error with code -32602; an API read that fails is an error without one. - mcp_
response - Answers one POST to the MCP endpoint, already authorised.