McpServer.handle

Dispatch a single parsed message. Returns the JSON-RPC response for requests, or Nullable.init for notifications (which get no reply). ctx is the channel for any server->client traffic the handler emits; when omitted, a NullContext is used (no streaming).

  1. Nullable!Json handle(Message msg, RequestContext ctx)
    class McpServer
    @safe
    Nullable!Json
    handle
  2. Nullable!Json handle(Message msg)