Expand description
jev as an MCP server: the one-shot commands, offered to an agent as tools.
This half is pure — a JSON-RPC message in, a JSON-RPC message out — so the protocol can be
tested without a pipe. Everything that touches the network goes through Host::ask, which
the caller supplies; crate::serve is the part that puts it on stdin and stdout.
Structs§
- Host
- What the host does for the tools that need more than text: send a request, price it, name a model.
- Sent
- What the host got back from one send: the answers
jev evalscores, plus the raw body when there was one, sojev_askcan hand it over for a script to read. - Tool
Result - What a tool call comes back with: text, and whether it describes a failure.
Constants§
- INVALID_
PARAMS - INVALID_
REQUEST - KNOWN_
PROTOCOLS - Revisions a client may ask for and still be understood; anything else gets ours back.
- METHOD_
NOT_ FOUND - PARSE_
ERROR - JSON-RPC error codes, the ones this server can actually raise.
- PROTOCOL_
VERSION - The protocol revision this server speaks.
- SERVER_
NAME - The name the server reports at
initialize, and the prefix on every tool.
Functions§
- call
- Run one tool. Argument problems come back as an error result, not as a JSON-RPC failure.
- handle
- Answer one JSON-RPC message.
- handle_
line - One line of stdio: parse it, answer it, hand back the line to write — or nothing.
- tools
- Every tool this server offers, in the order an agent should reach for them.
Type Aliases§
- Ask
- Send one session and come back with its answers, or with why it did not.