- The client sends JSON-RPC requests and notifications.
- The server answers each request with a JSON-RPC response (a result or error), optionally preceded by notifications scoped to that request.
Request and Response
The client sends a request; the server answers it with a result or an error. While the request is in flight, the server MAY send notifications scoped to it, such asnotifications/progress
and notifications/message.
Multi Round-Trip Requests
When a server needs client input (sampling, elicitation, or roots) to complete a request, it answers with anInputRequiredResult
and the client retries the request with the matching inputResponses. See
Multi Round-Trip Requests.
Subscribe and Notify
To receive change notifications (list changes, resource updates), the client sends asubscriptions/listen
request; the reply is a long-lived stream of the requested notification
types. Stream state is scoped to the request: if the underlying channel is
lost, the client re-issues the request.