McpServer.handleRaw

As handleRaw(text, sink), but with the stdio server->client request channel: when a handler calls ctx.sendRequest (e.g. via ctx.sample/ctx.elicit) serverRequest(method, params) is invoked to write the request and block the current task for the client's reply (the DuplexChannel correlates it on its read loop). null reproduces the no-channel behaviour (server->client requests throw).

  1. string handleRaw(string text)
  2. string handleRaw(string text, ConnectionState conn)
  3. string handleRaw(string text, void delegate(string) @(safe) sink)
  4. string handleRaw(string text, void delegate(string) @(safe) sink, Json delegate(string, Json) @(safe) serverRequest)
    class McpServer
    @safe
    string
    handleRaw
    (
    string text
    ,
    scope void delegate
    (
    string
    )
    @safe
    sink
    ,
    scope Json delegate
    (
    string
    ,
    Json
    )
    @safe
    serverRequest
    )