McpServer.handleRaw

As handleRaw, but with a server->client write sink for transports (such as stdio) that can deliver out-of-band frames on the same channel. Each message is dispatched with a StdioContext bound to sink, so a handler's ctx.log() / ctx.reportProgress() are serialised and pushed to sink as they happen — before the request's reply, which is still returned as the string result. When sink is null a NullContext is used (no streaming), preserving the in-process behaviour of the no-argument overload.

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