Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Skip to main content
Message Patterns
Overview
This page defines the message patterns of the core protocol: the ways a
client and server compose JSON-RPC
requests, responses, and notifications
into interactions. Every
transport carries all of these
patterns; transports differ only in how messages are framed and delivered.
Every interaction begins with the client:
- 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.
Adding Patterns
All core protocol features are built from these patterns. A protocol revision that adds a pattern defines it on this page. Transports carry new patterns without changes, because patterns are expressed entirely in terms of requests, responses, and notifications.Was this page helpful?
Assistant
Responses are generated using AI and may contain mistakes.
