Package-level declarations
Types
Optional annotations for the client. The client can use annotations to inform how objects are used or displayed.
Audio provided to or from an LLM.
Represents the binary contents of a resource encoded as a base64 string.
Used by the client to invoke a tool provided by the server.
The server's response to a tool call.
Represents a notification sent by the client.
Represents a request sent by the client.
Represents a result returned to the client.
CallToolResult extended with backwards compatibility to protocol version 2024-11-05.
The client's response to a sampling/create_message request from the server. The client should inform the user before returning the sampled message to allow them to inspect the response (human in the loop) and decide whether to allow the server to see it.
An implementation of WithMeta containing custom metadata.
A custom request with a specified method.
The contents of a resource, embedded into a prompt or tool call result.
An empty result for a request containing optional metadata.
Annotation marking an API as experimental and subject to changes or removal in the future.
Used by the client to get a prompt provided by the server.
The server's response to a prompts/get request from the client.
An image provided to or from an LLM.
Describes the name and version of an MCP implementation.
This request is sent from the client to the server when it first connects, asking it to begin initialization.
After receiving an initialized request from the client, the server sends this response.
A response to a request that indicates an error occurred.
Represents a JSON-RPC message in the protocol.
A notification which does not expect a response.
A request that expects a response.
A successful (non-error) response to a request.
Sent from the client to request a list of prompts and prompt templates the server has.
The server's response to a prompts/list request from the client.
Sent from the client to request a list of resources the server has.
The server's response to a resources/list request from the client.
Sent from the client to request a list of resource templates the server has.
The server's response to a resources/templates/list request from the client.
Sent from the server to request a list of root URIs from the client.
The client's response to a roots/list request from the server.
Sent from the client to request a list of tools the server has.
The server's response to a tools/list request from the client.
The severity of a log message.
Represents an error specific to the MCP protocol.
Hints to use for model selection.
The server's preferences for model selection, requested by the client during sampling.
Represents a notification in the protocol.
Base interface for notification parameters with optional metadata.
Represents a request supporting pagination.
Represents a paginated result of a request.
A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else it may be disconnected.
Represents a progress notification.
Represents the base interface for progress tracking.
A progress token, used to associate progress notifications with the original request. Stores message ID.
A prompt or prompt template that the server offers.
Describes an argument that a prompt can accept.
Describes a message returned as part of a prompt.
Represents the content of a prompt message.
Represents prompt message content that is either text, image or audio.
Identifies a prompt.
Sent from the client to the server to read a specific resource URI.
The server's response to a resources/read request from the client.
Represents a request in the protocol.
Represents the result of a request, including additional metadata.
A known resource that the server is capable of reading.
The contents of a specific resource or sub-resource.
A template description for resources available on the server.
A reference to a resource or resource template definition.
Represents a root directory or file that the server can operate on.
Describes a message issued to or received from an LLM API.
Represents a notification sent by the server.
Represents a request sent by the server.
Represents a result returned by the server.
Sent from the client to request resources/updated notifications from the server whenever a particular resource changes.
Text provided to or from an LLM.
Represents the text contents of a resource.
Additional properties describing a Tool to clients.
Unknown content provided to or from an LLM.
Represents a request or notification for an unknown method.
Identifies a prompt.
Represents resource contents with unknown or unspecified data.
Sent from the client to request cancellation of resources/updated notifications from the server. This should follow a previous resources/subscribe request.
Represents an entity that includes additional metadata in its responses.
Properties
Functions
The server's response to a tool call.
This notification can be sent by either side to indicate that it is cancelling a previously issued request.
Capabilities a client may support. Known capabilities are defined here, in this, but this is not a closed set: any client can define its own, additional capabilities.
A request from the client to the server to ask for completion options.
The server's response to a completion/complete request
Sent from the server to create an elicitation from the client.
The client's response to an elicitation/create request from the server.
A request from the server to sample an LLM via the client. The client has full discretion over which model to select. The client should also inform the user before beginning sampling to allow them to inspect the request (human in the loop) and decide whether to approve it.
Creates a CallToolResult with single TextContent and meta, with isError being true.
This notification is sent from the client to the server after initialization has finished.
Notification of a log message passed from server to client. If no logging level request has been sent from the client, the server MAY decide which messages to send automatically.
Creates a CallToolResult with single TextContent and meta.
An out-of-band notification used to inform the receiver of a progress update for a long-running request.
An optional notification from the server to the client, informing it that the list of prompts it offers has changed. Servers may issue this without any previous subscription from the client.
An optional notification from the server to the client, informing it that the list of resources it can read from has changed. Servers may issue this without any previous subscription from the client.
A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a resources/subscribe request.
A notification from the client to the server, informing it that the list of roots has changed.
Represents the capabilities that a server can support.
Converts the notification to a JSON-RPC notification.
Converts the request to a JSON-RPC request.
Definition for a tool the client can call.
An optional notification from the server to the client, informing it that the list of tools it offers has changed. Servers may issue this without any previous subscription from the client.