ezmcp
Search uses release 0.1.0.0 · 416 definitions
Definitions (416)
- def toola tool: its name, a description for the model, and the JSON Schema of its arguments (an object schema)
- def servera server: name and version (serverInfo), instructions for the client ("" for none), and its tools in the order tools/list shows them
- def latestthe latest protocol revision ezmcp speaks
- def revisionsthe protocol revisions ezmcp speaks, oldest first
- def stepwhat a server does with one message's text, read by revision `rev`: Quiet (send nothing), Send or Fault (send this reply; a Fault is a message it could not accept), Run (run a tool, then send `ran` of its result), or, under 2025-03-26, Batch (do each of its acts, then send `batch.reply` of their replies).
- def turn`step`'s act, and the revision a stream's next message is read by: the one an initialize was answered with, else `rev`.
- def ranthe reply to a tool call with this id under revision `rev`, once the runner answered (2025-03-26 leaves structuredContent out)
- def batch.replywhat a batch sends back, from its acts' replies in order (None for an act with none): nothing when none has one, else their array
- def oka runner's answer for a tool that ran: its tool result, which may itself report a failure with `isError` (`result.error`)
- def refusea runner's answer for a call it refuses as a protocol error: a JSON-RPC error with this code and message instead of a tool result (server/tools#error-handling)
- def refuse.paramsrefuse with -32602 Invalid params, as for arguments that do not match the tool's input schema
- def refuse.internalrefuse with -32603 Internal error, as for a server that cannot run the tool
- def texta text content block
- def resulta tool result from content blocks; is_error flags a tool that failed, so the model sees the failure (server/tools#error-handling)
- def result.texta tool result of one text block
- def result.errora failed tool's result: one text block, isError true
- def result.jsona tool result with structured content, and its JSON text as a text block; a 2025-03-26 client gets the text block alone
- def http.decidewhat the HTTP transport decides for one request to an endpoint at `path` that allows the browser origins listed: a reply now, or a tool to run
- def http.handleone request to the MCP endpoint at `path`, as an ezhttp IO handler, for a server that serves other paths too
- def http.serveserve the endpoint on host:port for `limit` connections, each on its own fork with no limit on how many at once, then stop once every connection is closed
- def http.serve_foreverserve the endpoint on host:port until the process is stopped, each connection on its own fork with no limit on how many at once
- def http.handle_withone request to the MCP endpoint at `path`, its runner given `ctx`
- def http.serve_withserve the endpoint on host:port for `limit` connections, its runner given `ctx`, each connection on its own fork and at most `max` at once (0: no limit; 1: one at a time), then stop once every connection is closed
- def http.serve_forever_withserve the endpoint on host:port, its runner given `ctx`, each connection on its own fork and at most `max` at once (0: no limit; 1: one at a time), until the process is stopped
- def http.handle_fromone request to the MCP endpoint at `path`, its server and runner given `ctx`
- def http.serve_fromserve the endpoint on host:port for `limit` connections, its server and runner given `ctx`, each connection on its own fork and at most `max` at once (0: no limit), then stop once every connection is closed
- def http.serve_forever_fromserve the endpoint on host:port, its server and runner given `ctx`, each connection on its own fork and at most `max` at once (0: no limit), until the process is stopped
- def stdio.serve_withserve stdin and stdout, its runner given `ctx`, until stdin ends
- def stdio.serveserve newline-delimited JSON-RPC on stdin and stdout until stdin ends; write logs with IO.print_err, never to stdout
- def openapi.opsevery operation of an OpenAPI document (a JSON value), in the order of its paths, each path's in the order get, put, post, delete, options, head, patch, trace; its local references (`#/...`) followed
- def openapi.toolan operation's tool: its name, description and input schema
- def openapi.namean operation's tool name: its operationId as a tool name
- def openapi.renamedan operation under another tool name, for a client that limits names
- def openapi.checkwhat is wrong with a call's arguments for an operation's input schema, when anything is: Some of the message, or None when they fit
- def openapi.callthe request a call of an operation with these arguments stands for: Send{method, target, headers, body} (the target is the path and query, for the caller to append to the API's base URL), or Unfilled{path} when a path parameter has no argument
- def client.initializethe initialize request, naming the client
- def client.initializedthe notification to send once initialize succeeded
- def client.toolsa tools/list request
- def client.calla tools/call request
- def client.readwhat a reply's JSON text says: Got{id, result}, Refused{id, code, message} or Unread{why}
- def client.versionthe revision an initialize result names, "" when it names none
- def client.askPOST a request to an MCP endpoint and read its reply, JSON or an event stream.
- def client.tellPOST a notification; whether the server accepted it (any 2xx)
- def init.paramsthe params of initialize: the latest revision, no client capabilities, and the client's name and version (basic/lifecycle#initialization)
- def initializethe initialize request
- def initializedthe notification a client sends once initialize succeeded
- def toolsa tools/list request
- def calla tools/call request
- def headersthe headers of every POST: a JSON body, both reply types accepted, and the negotiated revision once there is one (empty before initialize)
- def is.ssewhether a Content-Type is an event stream
- def bodya reply body's JSON text: an event stream's last data, else the body
- def took.ok
- def tookwhat an HTTP reply to a request says: a 200 is read as JSON or as an event stream by its Content-Type; any other status is unread
- def acceptedwhether an HTTP reply to a notification accepted it: any 2xx
- def versionthe revision an initialize result names, "" when it names none
- def act.replyone element of a batch, under revision `rev`: its reply, after running its tool when it is a tool call; none for a notification or a response
- def act.allevery element of a batch, in order
- def http.webact on the transport's decision: reply now, or run the tool and reply with its result, or run a batch's acts and reply with their replies
- def http.handle_withone HTTP request to a server's endpoint at `path`
- def http.answerthe endpoint's answer to one request ezhttp read, as its plain serves take one: the request as text in, a text reply out
- def http.serve_withserve `limit` connections, at most `max` at once (0: no limit), then stop
- def http.serve_forever_withserve until the process is stopped, at most `max` connections at once (0: no limit)
- def http.answer_fromthe endpoint's answer to one request ezhttp read, its server read from the context
- def http.serve_fromserve `limit` connections, at most `max` at once (0: no limit), then stop
- def http.serve_forever_fromserve until the process is stopped, at most `max` connections at once (0: no limit)
- def http.handleone HTTP request to a server's endpoint at `path`
- def http.serveserve `limit` connections, as many at once as arrive, then stop
- def http.serve_foreverserve until the process is stopped, as many connections at once as arrive
- def ezmcp.stdinup to `max` bytes from file descriptor 0, as one read(2) returns them; empty at the end of input (MCP-TRUST-5)
- def stdio.chunkbytes one read of stdin asks for
- def stdio.batcha batch's replies: nothing when there are none, else one line
- def stdio.actact on one line's act, read by revision `rev`: write a reply as one line, or run the tool and write its reply, or run a batch's acts and write the array of their replies, or write nothing
- def stdio.turnact on a turn read by revision `rev`, then go on with the revision after it
- def stdio.linesevery whole line, in order, each read by the revision the line before it left; answers the revision the last one left
- def stdio.cutact on a cut's whole lines, then read on with its rest
- def stdio.chunkedafter a read: an empty one is the end of stdin, and the bytes after the last newline are the last message; any other is cut into lines
- def stdio.gotafter one read: a failure is logged to stderr and ends the loop
- def stdio.loopread, act on every whole line, and read again until stdin ends; `rev` is the revision the next line is read by
- def stdio.serve_withserve newline-delimited JSON-RPC on stdin and stdout until stdin ends; a line is read by the latest revision until an initialize names another
- def stdio.serveserve newline-delimited JSON-RPC on stdin and stdout until stdin ends, with no context
- def client.tookwhat an ezhttp response to a request says
- def client.askPOST one request and read its reply
- def client.sent
- def client.tellPOST one notification; whether the server accepted it
- type Cutwhole lines, each with its newline, and the bytes after the last newline
- def nla byte is a newline
- def split.putput a byte at the front of the first piece
- def split.ata newline ends a piece of its own, which the bytes before it join; any other byte joins the first piece
- def splitbytes split after every newline: each piece but the last ends with its newline, and the last has none
- def cut.cons
- def cut.go
- def cut.of
- def cutthe whole lines in a buffer, and what follows the last newline
- def conta byte is a continuation byte, 0x80 to 0xBF
- def badU+FFFD, for a byte that starts no valid sequence
- def low6a continuation byte's six payload bits
- def twothe code point of a two-byte sequence
- def threethe code point of a three-byte sequence
- def fourthe code point of a four-byte sequence
- type Widthhow many bytes a lead byte starts