Function

request

Send a request to the client on the current SSE response stream

Servers can request information from clients using the elicitation mechanism. The request is sent on the HTTP SSE stream, but the client's JSON-RPC response arrives as a new HTTP POST request.

To await responses:

  1. Send the request using this function
  2. Use sessions interface to track pending requests
  3. Match incoming HTTP requests to pending elicitations

Note: Client MCP/JSON-RPC responses arrive as new HTTP requests. Use sessions to await client responses within a handler instance.

https://spec.modelcontextprotocol.io/specification/2025-06-18/client/elicitation

request: func(output: borrow​<output-stream>, request: server-request) -> result​<_, notification-error>;