Package-level declarations
Types
Optional annotations for the client.
Audio provided to or from an LLM.
DSL builder for constructing AudioContent instances.
Base parameters for notifications that only contain metadata.
The contents of a specific resource or sub-resource.
Used by the client to invoke a tool provided by the server.
DSL builder for constructing CallToolRequest instances.
Parameters for a tools/call request.
The server's response to a CallToolRequest.
This notification can be sent by either side to indicate that it is cancelling a previously-issued request.
Parameters for a notifications/cancelled notification.
Capabilities that a client may support.
DSL builder for constructing ClientCapabilities instances.
Represents a notification sent by the client.
Represents a request sent by the client.
A request from the client to the server to ask for completion options.
DSL builder for constructing CompleteRequest instances.
Parameters for the completion request.
The server's response to a CompleteRequest.
A request from the server to sample an LLM via the client.
DSL builder for constructing CreateMessageRequest instances.
Parameters for a sampling/createMessage request.
The client's response to a CreateMessageRequest from the server.
Represents a custom notification method that is not part of the core MCP specification.
A custom request with a specified method.
A request from the server to elicit additional information from the user via the client.
DSL builder for constructing ElicitRequest instances.
DSL builder for constructing ElicitRequestParams.RequestedSchema instances.
Parameters for an elicitation/create request.
The client's response to an ElicitRequest.
The contents of a resource, embedded into a prompt or tool call result.
An empty result for a request containing optional metadata.
Used by the client to get a prompt provided by the server.
DSL builder for constructing GetPromptRequest instances.
Parameters for a prompts/get request.
The server's response to a GetPromptRequest from the client.
An image provided to or from an LLM.
DSL builder for constructing ImageContent instances.
Specifies which MCP server context to include in the sampling request.
This notification is sent from the client to the server after initialization has finished.
This request is sent from the client to the server when it first connects, asking it to begin initialization.
DSL builder for constructing InitializeRequest instances.
Parameters for an initialize request.
After receiving an InitializeRequest from the client, the server sends this response.
A response to a request that indicates an error occurred.
Base interface for all JSON-RPC 2.0 messages.
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.
DSL builder for constructing ListPromptsRequest instances.
The server's response to a ListPromptsRequest from the client.
Sent from the client to request a list of resources the server has.
DSL builder for constructing ListResourcesRequest instances.
The server's response to a ListResourcesRequest from the client.
Sent from the client to request a list of resource templates the server has.
DSL builder for constructing ListResourceTemplatesRequest instances.
The server's response to a ListResourceTemplatesRequest from the client.
Sent from the server to request a list of root URIs from the client.
DSL builder for constructing ListRootsRequest instances.
The client's response to a ListRootsRequest from the server.
Sent from the client to request a list of tools the server has.
DSL builder for constructing ListToolsRequest instances.
The server's response to a ListToolsRequest from the client.
The severity of a log message.
A notification of a log message passed from server to client.
Parameters for a notifications/message notification.
Represents an error specific to the MCP protocol.
Base DSL builder for constructing MediaContent instances.
Represents a method in the protocol, which can be predefined or custom.
Hints to use for model selection.
Represents a notification in the protocol.
Interface for notification parameter types.
Represents a request supporting pagination.
Base DSL builder for constructing paginated MCP request instances.
Common parameters for paginated requests.
Represents a request supporting pagination.
DSL builder for constructing PingRequest instances.
An out-of-band notification used to inform the receiver of a progress update for a long-running request.
Parameters for a notifications/progress notification.
A progress token, used to associate progress notifications with the original request.
A prompt or prompt template that the server offers.
Describes an argument that a prompt can accept.
An optional notification from the server to the client, informing it that the list of prompts it offers has changed.
Describes a message returned as part of a prompt.
Identifies a prompt by reference.
Sent from the client to the server to read a specific resource URI.
DSL builder for constructing ReadResourceRequest instances.
Parameters for a resources/read request.
The server's response to a ReadResourceRequest from the client.
Base interface for reference types in the protocol.
Represents a request in the protocol.
Base DSL builder for constructing MCP request instances.
A uniquely identifying ID for a request in JSON-RPC.
DSL builder for constructing RequestMeta instances.
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 resource that the server is capable of reading, included in a prompt or tool call result.
An optional notification from the server to the client, informing it that the list of resources it can read from has changed.
A template description for resources available on the server.
A reference to a resource or resource template definition.
A notification from the server to the client, informing it that a resource has changed and may need to be read again.
Parameters for a notifications/resources/updated notification.
The sender or recipient of messages and data in a conversation.
Represents a root directory or file that the server can operate on.
A notification from the client to the server, informing it that the list of roots has changed.
Error information for a failed JSON-RPC request.
Describes a message issued to or received from an LLM API.
DSL builder for constructing lists of SamplingMessage instances.
Capabilities that a server may support.
Represents a notification sent by the server.
Represents a request sent by the server.
A request from the client to the server to enable or adjust logging.
DSL builder for constructing SetLevelRequest instances.
Parameters for a logging/setLevel request.
Sent from the client to request resources/updated notifications from the server whenever a particular resource changes.
DSL builder for constructing SubscribeRequest instances.
Parameters for a resources/subscribe request.
Text provided to or from an LLM.
DSL builder for constructing TextContent instances.
Represents the text contents of a resource.
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.
A JSON Schema for tool input or output parameters.
Represents resource contents with unknown or unspecified data.
Sent from the client to request cancellation of resources/updated notifications from the server.
DSL builder for constructing UnsubscribeRequest instances.
Parameters for a resources/unsubscribe request.
Represents an entity that includes additional metadata in its responses.
Properties
Functions
Adds an assistant message with simple text content.
Adds an assistant message with audio content.
Adds an assistant message with image content.
Adds an assistant message with text content using a DSL builder.
Creates a CallToolResult with single TextContent and meta, with isError being true.
Decodes a JSON-RPC request into a protocol-specific Request.
Creates a CallToolResult with single TextContent and meta.
Converts the notification to a JSON-RPC notification.
Converts the request to a JSON-RPC request.
Adds a user message with simple text content.
Adds a user message with audio content.
Adds a user message with image content.
Adds a user message with text content using a DSL builder.