On this page
MCPRequestHandler.respond(to:emit:)
- Declared in
- MCPRequestHandler
- Package
- libtmux-swift
- Source
- Sources/LibTmuxMCP/MCPProtocol.swift
-
-
Answers one newline-delimited JSON-RPC request.
Returns the response line, or
nilfor a valid notification, an oversized request, or a tool call whose id cannot fit in a bounded response. Malformed JSON and invalid request objects receive the standard JSON-RPC error with a null id.- Parameters:
- line: one JSON-RPC request without its trailing newline.
- emit: where a notification sent *before* the answer goes — progress, while a long call is still running. Writing them is the caller's job because they share the one stdout the answer uses, and two writers there would interleave.
- Parameters:
0 declared, 0 inherited