Expand description
MCP-shaped protocol documentation.
The internal TUI LLM has its own documentation renderer
(llm::actions::tools::execute_read_documentation) which describes the
open_server / open_client actions and the base_stack parameter.
None of that exists on the MCP surface: an MCP caller has start_server /
start_client tools with a fixed argument list.
This module renders documentation aimed at an MCP caller — the exact tool
arguments that apply, the protocol’s event ids with their field names and
types (needed to write an event_handlers script), its action names with
parameter schemas and examples, its startup parameters, its privilege
requirement, its maturity, what it writes when the model cannot answer
(failure_mode), and whether it keeps per-connection state (connectionless).
Every action is rendered in full — parameters and a JSON example — including
the async ones, because those are invocable from MCP: a client’s through
send_to_client, a server’s through send_to_peer on a connection whose
protocol registers a peer handle.
Nothing here mentions open_server, open_client or base_stack.
Functions§
- render_
protocol_ docs - Render MCP-shaped documentation for one protocol.