McpJson
Everything this endpoint puts on the wire: JSON-RPC envelopes, MCP tool results and the tools/list prose. All pure functions of their arguments, which is why they are here rather than in McpServer — that file keeps what needs a live server behind it.
Every string here is read by a model, not by a maintainer, and is written to lower FRICTION — not to be complete, and not to be exact. A reader's attention is spent on every call and prose earns none of it back unless it changes which call comes next: a caveat for a corner the caller will not reach, or a "do not do X", is billed on every request and collected on almost none. Cover the path taken, then stop.
One guarantee stands against that: a SUCCESSFUL result is ground truth — a caller may build on it without checking. Nothing else is promised. A description may be incomplete, and a failure report is written to point at the next correct action rather than to account for what happened. Where that account matters it goes in a KDoc, which costs a model nothing.
Types
Properties
Functions
The initialize prose: launch constants a script could read for itself, carried here so no eval is spent asking. The mod's own version is not repeated — serverInfo.version has it.
The MCP envelope every tools/list entry shares. Written once here instead of once per tool: what differs between two tools is their prose, and this is the part that doesn't.