McpResponseBody

sealed interface McpResponseBody

Inheritors

Types

Link copied to clipboard
data object Empty : McpResponseBody

Empty body (e.g. HTTP 202 Accepted for notifications).

Link copied to clipboard
data class EventStream(val events: Flow<String>) : McpResponseBody

text/event-stream: flow of SSE data: payloads. Each payload is normally a JSON-RPC message; unrelated notifications may be interleaved.

Link copied to clipboard
value class Text(val value: String) : McpResponseBody

application/json (or anything not recognized as SSE/empty): the whole body as raw text.