Package-level declarations

Types

Link copied to clipboard
data class Annotations(val audience: List<Role>? = null, val priority: Double? = null, val lastModified: String? = null)

Optional annotations for the client.

Link copied to clipboard
data class AudioContent(val data: String, val mimeType: String, val annotations: Annotations? = null, val meta: JsonObject? = null) : MediaContent

Audio provided to or from an LLM.

Link copied to clipboard

DSL builder for constructing AudioContent instances.

Link copied to clipboard

Base parameters for notifications that only contain metadata.

Link copied to clipboard

Default RequestParams implementation carrying only optional metadata.

Link copied to clipboard
data class BlobResourceContents(val blob: String, val uri: String, val mimeType: String? = null, val meta: JsonObject? = null) : ResourceContents

The contents of a specific resource or sub-resource.

Link copied to clipboard
data class BooleanSchema(val title: String? = null, val description: String? = null, val default: Boolean? = null) : PrimitiveSchemaDefinition

Defines a boolean-typed property in an elicitation schema.

Link copied to clipboard

Used by the client to invoke a tool provided by the server.

Link copied to clipboard

DSL builder for constructing CallToolRequest instances.

Link copied to clipboard
data class CallToolRequestParams(val name: String, val arguments: JsonObject? = null, val meta: RequestMeta? = null) : RequestParams

Parameters for a tools/call request.

Link copied to clipboard
data class CallToolResult(val content: List<ContentBlock>, val isError: Boolean? = null, val structuredContent: JsonObject? = null, val meta: JsonObject? = null) : ServerResult

The server's response to a CallToolRequest.

Link copied to clipboard

This notification can be sent by either side to indicate that it is cancelling a previously-issued request.

Link copied to clipboard
data class CancelledNotificationParams(val requestId: RequestId, val reason: String? = null, val meta: JsonObject? = null) : NotificationParams

Parameters for a notifications/cancelled notification.

Link copied to clipboard

A request to cancel a task.

Link copied to clipboard
data class CancelTaskRequestParams(val taskId: String, val meta: RequestMeta? = null) : RequestParams

Parameters for a tasks/cancel request.

Link copied to clipboard

The response to a tasks/cancel request.

Link copied to clipboard
data class ClientCapabilities(val sampling: JsonObject? = null, val roots: ClientCapabilities.Roots? = null, val elicitation: JsonObject? = null, val experimental: JsonObject? = null)

Capabilities that a client may support.

Link copied to clipboard

DSL builder for constructing ClientCapabilities instances.

Link copied to clipboard

Represents a notification sent by the client.

Link copied to clipboard

Represents a request sent by the client.

Link copied to clipboard

Represents a result returned by the server in response to a ClientRequest.

Link copied to clipboard

A request from the client to the server to ask for completion options.

Link copied to clipboard

DSL builder for constructing CompleteRequest instances.

Link copied to clipboard
data class CompleteRequestParams(val argument: CompleteRequestParams.Argument, val ref: Reference, val context: CompleteRequestParams.Context? = null, val meta: RequestMeta? = null) : RequestParams

Parameters for the completion request.

Link copied to clipboard
data class CompleteResult(val completion: CompleteResult.Completion, val meta: JsonObject? = null) : ServerResult

The server's response to a CompleteRequest.

Link copied to clipboard

Base interface for all content blocks in the protocol.

Link copied to clipboard

Discriminator values for the polymorphic ContentBlock hierarchy.

Link copied to clipboard

A request from the server to sample an LLM via the client.

Link copied to clipboard

DSL builder for constructing CreateMessageRequest instances.

Link copied to clipboard
data class CreateMessageRequestParams(val maxTokens: Int, val messages: List<SamplingMessage>, val modelPreferences: ModelPreferences? = null, val systemPrompt: String? = null, val includeContext: IncludeContext? = null, val temperature: Double? = null, val stopSequences: List<String>? = null, val metadata: JsonObject? = null, val meta: RequestMeta? = null) : RequestParams

Parameters for a sampling/createMessage request.

Link copied to clipboard
data class CreateMessageResult(val role: Role, val content: MediaContent, val model: String, val stopReason: StopReason? = null, val meta: JsonObject? = null) : ClientResult

The client's response to a CreateMessageRequest from the server.

Link copied to clipboard
data class CreateTaskResult(val task: Task, val meta: JsonObject? = null) : ClientResult, ServerResult

A response to a task-augmented request.

Link copied to clipboard

Represents a custom notification method that is not part of the core MCP specification.

Link copied to clipboard
open class CustomRequest(val method: Method, val params: BaseRequestParams?) : Request

A custom request with a specified method.

Link copied to clipboard
data class DoubleSchema(val title: String? = null, val description: String? = null, val minimum: Double? = null, val maximum: Double? = null, val default: Double? = null) : NumberSchemaDefinition

Defines a floating-point number property in an elicitation schema.

Link copied to clipboard

An optional notification from the server to the client, informing it of a completion of an out-of-band elicitation request.

Link copied to clipboard
data class ElicitationCompleteNotificationParams(val elicitationId: String, val meta: JsonObject? = null) : NotificationParams

Parameters for a notifications/elicitation/complete notification.

Link copied to clipboard

Represents an elicitation/create request from the server to the client.

Link copied to clipboard

DSL builder for constructing ElicitRequest instances.

Link copied to clipboard

DSL builder for constructing ElicitRequestParams.RequestedSchema instances.

Link copied to clipboard
data class ElicitRequestFormParams(val message: String, val task: TaskMetadata? = null, val requestedSchema: ElicitRequestParams.RequestedSchema, val meta: RequestMeta? = null) : ElicitRequestParams

Represents form mode parameters for an elicitation/create request.

Link copied to clipboard

Represents the parameters for an elicitation/create request.

Link copied to clipboard
data class ElicitRequestURLParams(val message: String, val elicitationId: String, val url: String, val task: TaskMetadata? = null, val meta: RequestMeta? = null) : ElicitRequestParams

Represents URL mode parameters for an elicitation/create request.

Link copied to clipboard
data class ElicitResult(val action: ElicitResult.Action, val content: JsonObject? = null, val meta: JsonObject? = null) : ClientResult

Represents the client's response to an ElicitRequest.

Link copied to clipboard
data class EmbeddedResource(val resource: ResourceContents, val annotations: Annotations? = null, val meta: JsonObject? = null) : ContentBlock

The contents of a resource, embedded into a prompt or tool call result.

Link copied to clipboard

An empty result for a request containing optional metadata.

Link copied to clipboard
data class EnumOption(val const: String, val title: String)

Represents an enum option with a value and a display label.

Link copied to clipboard

Defines an enumeration property in an elicitation schema.

Link copied to clipboard

Used by the client to get a prompt provided by the server.

Link copied to clipboard

DSL builder for constructing GetPromptRequest instances.

Link copied to clipboard
data class GetPromptRequestParams(val name: String, val arguments: Map<String, String>? = null, val meta: RequestMeta? = null) : RequestParams

Parameters for a prompts/get request.

Link copied to clipboard
data class GetPromptResult(val messages: List<PromptMessage>, val description: String? = null, val meta: JsonObject? = null) : ServerResult

The server's response to a GetPromptRequest from the client.

Link copied to clipboard

A request to retrieve the result of a completed task.

Link copied to clipboard
data class GetTaskPayloadRequestParams(val taskId: String, val meta: RequestMeta? = null) : RequestParams

Parameters for a tasks/result request.

Link copied to clipboard

The response to a tasks/result request.

Link copied to clipboard

A request to retrieve the state of a task.

Link copied to clipboard
data class GetTaskRequestParams(val taskId: String, val meta: RequestMeta? = null) : RequestParams

Parameters for a tasks/get request.

Link copied to clipboard
data class GetTaskResult(val taskId: String, val status: TaskStatus, val statusMessage: String? = null, val createdAt: String, val lastUpdatedAt: String, val ttl: Long?, val pollInterval: Long? = null, val meta: JsonObject? = null) : ClientResult, ServerResult, TaskFields

The response to a tasks/get request.

Link copied to clipboard
data class Icon(val src: String, val mimeType: String? = null, val sizes: List<String>? = null, val theme: Icon.Theme? = null)

An optionally sized icon that can be displayed in a user interface.

Link copied to clipboard
data class ImageContent(val data: String, val mimeType: String, val annotations: Annotations? = null, val meta: JsonObject? = null) : MediaContent

An image provided to or from an LLM.

Link copied to clipboard

DSL builder for constructing ImageContent instances.

Link copied to clipboard
data class Implementation(val name: String, val version: String, val title: String? = null, val websiteUrl: String? = null, val icons: List<Icon>? = null)

Describes an MCP (Model Context Protocol) implementation.

Link copied to clipboard

Specifies which MCP server context to include in the sampling request.

Link copied to clipboard

This notification is sent from the client to the server after initialization has finished.

Link copied to clipboard

This request is sent from the client to the server when it first connects, asking it to begin initialization.

Link copied to clipboard

DSL builder for constructing InitializeRequest instances.

Link copied to clipboard
data class InitializeRequestParams(val protocolVersion: String, val capabilities: ClientCapabilities, val clientInfo: Implementation, val meta: RequestMeta? = null) : RequestParams

Parameters for an initialize request.

Link copied to clipboard
data class InitializeResult(val protocolVersion: String = LATEST_PROTOCOL_VERSION, val capabilities: ServerCapabilities, val serverInfo: Implementation, val instructions: String? = null, val meta: JsonObject? = null) : ServerResult

After receiving an InitializeRequest from the client, the server sends this response.

Link copied to clipboard
data class IntegerSchema(val title: String? = null, val description: String? = null, val minimum: Int? = null, val maximum: Int? = null, val default: Int? = null) : NumberSchemaDefinition

Defines an integer-typed property in an elicitation schema.

Link copied to clipboard

Represents an empty JSON-RPC message used as a placeholder or no-op response.

Link copied to clipboard
data class JSONRPCError(val id: RequestId?, val error: RPCError) : JSONRPCMessage

A response to a request that indicates an error occurred.

Link copied to clipboard

Base interface for all JSON-RPC 2.0 messages.

Link copied to clipboard
data class JSONRPCNotification(val method: String, val params: JsonElement? = null) : JSONRPCMessage

A notification which does not expect a response.

Link copied to clipboard
data class JSONRPCRequest @JvmOverloads constructor(val id: RequestId = RequestId(Uuid.random().toHexString()), val method: String, val params: JsonElement? = null) : JSONRPCMessage

A request that expects a response.

Link copied to clipboard
data class JSONRPCResponse(val id: RequestId, val result: RequestResult = EmptyResult()) : JSONRPCMessage

A successful (non-error) response to a request.

Link copied to clipboard
data class LegacyTitledEnumSchema(val title: String? = null, val description: String? = null, val enumValues: List<String>, val enumNames: List<String>? = null, val default: String? = null) : EnumSchemaDefinition

Defines a single-selection enumeration with display names via the deprecated enumNames array.

Link copied to clipboard

Sent from the client to request a list of prompts and prompt templates the server has.

Link copied to clipboard

DSL builder for constructing ListPromptsRequest instances.

Link copied to clipboard
data class ListPromptsResult(val prompts: List<Prompt>, val nextCursor: String? = null, val meta: JsonObject? = null) : ServerResult, PaginatedResult

The server's response to a ListPromptsRequest from the client.

Link copied to clipboard

Sent from the client to request a list of resources the server has.

Link copied to clipboard

DSL builder for constructing ListResourcesRequest instances.

Link copied to clipboard
data class ListResourcesResult(val resources: List<Resource>, val nextCursor: String? = null, val meta: JsonObject? = null) : ServerResult, PaginatedResult

The server's response to a ListResourcesRequest from the client.

Link copied to clipboard

Sent from the client to request a list of resource templates the server has.

Link copied to clipboard
data class ListResourceTemplatesResult(val resourceTemplates: List<ResourceTemplate>, val nextCursor: String? = null, val meta: JsonObject? = null) : ServerResult, PaginatedResult

The server's response to a ListResourceTemplatesRequest from the client.

Link copied to clipboard

Sent from the server to request a list of root URIs from the client.

Link copied to clipboard

DSL builder for constructing ListRootsRequest instances.

Link copied to clipboard
data class ListRootsResult(val roots: List<Root>, val meta: JsonObject? = null) : ClientResult

The client's response to a ListRootsRequest from the server.

Link copied to clipboard

A request to retrieve a list of tasks.

Link copied to clipboard
data class ListTasksResult(val tasks: List<Task>, val nextCursor: String? = null, val meta: JsonObject? = null) : ClientResult, ServerResult, PaginatedResult

The response to a tasks/list request.

Link copied to clipboard

Sent from the client to request a list of tools the server has.

Link copied to clipboard

DSL builder for constructing ListToolsRequest instances.

Link copied to clipboard
data class ListToolsResult(val tools: List<Tool>, val nextCursor: String? = null, val meta: JsonObject? = null) : ServerResult, PaginatedResult

The server's response to a ListToolsRequest from the client.

Link copied to clipboard

The severity of a log message.

Link copied to clipboard

A notification of a log message passed from server to client.

Link copied to clipboard
data class LoggingMessageNotificationParams(val level: LoggingLevel, val data: JsonElement, val logger: String? = null, val meta: JsonObject? = null) : NotificationParams

Parameters for a notifications/message notification.

Link copied to clipboard
annotation class McpDsl

DSL marker annotation for MCP builder classes.

Link copied to clipboard
class McpException @JvmOverloads constructor(val code: Int, message: String = "MCP error ", val data: JsonElement? = null, cause: Throwable? = null) : Exception

Represents an error specific to the MCP protocol.

Link copied to clipboard

Content block that carries media data such as text, images, or audio.

Link copied to clipboard
abstract class MediaContentBuilder

Base DSL builder for constructing MediaContent instances.

Link copied to clipboard

Represents a method in the protocol, which can be predefined or custom.

Link copied to clipboard
data class ModelHint(val name: String?)

Hints to use for model selection.

Link copied to clipboard
data class ModelPreferences(val hints: List<ModelHint>? = null, val costPriority: Double? = null, val speedPriority: Double? = null, val intelligencePriority: Double? = null)

The server's preferences for model selection, requested of the client during sampling.

Link copied to clipboard

Defines a multiple-selection enumeration property.

Link copied to clipboard

Represents a notification in the protocol.

Link copied to clipboard

Interface for notification parameter types.

Link copied to clipboard

Defines a numeric property in an elicitation schema.

Link copied to clipboard

Represents a request supporting pagination.

Link copied to clipboard

Base DSL builder for constructing paginated MCP request instances.

Link copied to clipboard
data class PaginatedRequestParams(val cursor: String? = null, val meta: RequestMeta? = null) : RequestParams

Common parameters for paginated requests.

Link copied to clipboard

Represents a paginated result.

Link copied to clipboard

Represents a ping request used to check if the connection is alive.

Link copied to clipboard

DSL builder for constructing PingRequest instances.

Link copied to clipboard

Restricted schema definition for elicitation request properties.

Link copied to clipboard
class Progress(val progress: Double, val total: Double? = null, val message: String? = null)

Represents a progress notification.

Link copied to clipboard

An out-of-band notification used to inform the receiver of a progress update for a long-running request.

Link copied to clipboard
data class ProgressNotificationParams(val progressToken: ProgressToken, val progress: Double, val total: Double? = null, val message: String? = null, val meta: JsonObject? = null) : NotificationParams

Parameters for a notifications/progress notification.

Link copied to clipboard

A progress token, used to associate progress notifications with the original request.

Link copied to clipboard
data class Prompt(val name: String, val description: String? = null, val arguments: List<PromptArgument>? = null, val title: String? = null, val icons: List<Icon>? = null, val meta: JsonObject? = null) : WithMeta

A prompt or prompt template that the server offers.

Link copied to clipboard
data class PromptArgument(val name: String, val description: String? = null, val required: Boolean? = null, val title: String? = null)

Describes an argument that a prompt can accept.

Link copied to clipboard

An optional notification from the server to the client, informing it that the list of prompts it offers has changed.

Link copied to clipboard
data class PromptMessage(val role: Role, val content: ContentBlock)

Describes a message returned as part of a prompt.

Link copied to clipboard
data class PromptReference(val name: String, val title: String? = null) : Reference

Identifies a prompt by reference.

Link copied to clipboard

Sent from the client to the server to read a specific resource URI.

Link copied to clipboard

DSL builder for constructing ReadResourceRequest instances.

Link copied to clipboard
data class ReadResourceRequestParams(val uri: String, val meta: RequestMeta? = null) : RequestParams

Parameters for a resources/read request.

Link copied to clipboard
data class ReadResourceResult(val contents: List<ResourceContents>, val meta: JsonObject? = null) : ServerResult

The server's response to a ReadResourceRequest from the client.

Link copied to clipboard

Base interface for reference types in the protocol.

Link copied to clipboard

Discriminator for Reference subtypes used in completion and other operations.

Link copied to clipboard
data class RelatedTaskMetadata(val taskId: String)

Metadata for associating messages with a task. Include this in the _meta field under the key io.modelcontextprotocol/related-task.

Link copied to clipboard

Represents a request in the protocol.

Link copied to clipboard
abstract class RequestBuilder

Base DSL builder for constructing MCP request instances.

Link copied to clipboard

A uniquely identifying ID for a request in JSON-RPC.

Link copied to clipboard

Metadata attached to a request's _meta field.

Link copied to clipboard

DSL builder for constructing RequestMeta instances.

Link copied to clipboard
sealed interface RequestParams

Base interface for parameters attached to a Request.

Link copied to clipboard

Represents the result of a request, including additional metadata.

Link copied to clipboard
data class Resource(val uri: String, val name: String, val description: String? = null, val mimeType: String? = null, val size: Long? = null, val title: String? = null, val annotations: Annotations? = null, val icons: List<Icon>? = null, val meta: JsonObject? = null) : ResourceLike

A known resource that the server is capable of reading.

Link copied to clipboard

The contents of a specific resource or sub-resource.

Link copied to clipboard

Common interface for resource-like types that share URI, name, and description fields.

Link copied to clipboard
data class ResourceLink(val name: String, val uri: String, val title: String? = null, val size: Long? = null, val mimeType: String? = null, val icons: List<Icon>? = null, val description: String? = null, val annotations: Annotations? = null, val meta: JsonObject? = null) : ContentBlock, ResourceLike

A resource that the server is capable of reading, included in a prompt or tool call result.

Link copied to clipboard

An optional notification from the server to the client, informing it that the list of resources it can read from has changed.

Link copied to clipboard
data class ResourceTemplate(val uriTemplate: String, val name: String, val description: String? = null, val mimeType: String? = null, val title: String? = null, val annotations: Annotations? = null, val icons: List<Icon>? = null, val meta: JsonObject? = null) : WithMeta

A template description for resources available on the server.

Link copied to clipboard

A reference to a resource or resource template definition.

Link copied to clipboard

A notification from the server to the client, informing it that a resource has changed and may need to be read again.

Link copied to clipboard

Parameters for a notifications/resources/updated notification.

Link copied to clipboard

The sender or recipient of messages and data in a conversation.

Link copied to clipboard
data class Root(val uri: String, val name: String? = null, val meta: JsonObject? = null) : WithMeta

Represents a root directory or file that the server can operate on.

Link copied to clipboard

A notification from the client to the server, informing it that the list of roots has changed.

Link copied to clipboard
data class RPCError(val code: Int, val message: String, val data: JsonElement? = null)

Error information for a failed JSON-RPC request.

Link copied to clipboard
data class SamplingMessage(val role: Role, val content: MediaContent)

Describes a message issued to or received from an LLM API.

Link copied to clipboard

DSL builder for constructing lists of SamplingMessage instances.

Link copied to clipboard
data class ServerCapabilities(val tools: ServerCapabilities.Tools? = null, val resources: ServerCapabilities.Resources? = null, val prompts: ServerCapabilities.Prompts? = null, val logging: JsonObject? = null, val completions: JsonObject? = null, val experimental: JsonObject? = null)

Capabilities that a server may support.

Link copied to clipboard

Represents a notification sent by the server.

Link copied to clipboard

Represents a request sent by the server.

Link copied to clipboard

Represents a result returned by the client in response to a ServerRequest.

Link copied to clipboard

A request from the client to the server to enable or adjust logging.

Link copied to clipboard

DSL builder for constructing SetLevelRequest instances.

Link copied to clipboard
data class SetLevelRequestParams(val level: LoggingLevel, val meta: RequestMeta? = null) : RequestParams

Parameters for a logging/setLevel request.

Link copied to clipboard

Defines a single-selection enumeration property.

Link copied to clipboard
value class StopReason(val value: String)

The reason why the LLM stopped generating tokens.

Link copied to clipboard
data class StringSchema(val title: String? = null, val description: String? = null, val minLength: Int? = null, val maxLength: Int? = null, val format: StringSchemaFormat? = null, val default: String? = null) : PrimitiveSchemaDefinition

Defines a string-typed property in an elicitation schema.

Link copied to clipboard

Supported format constraints for StringSchema.

Link copied to clipboard

Sent from the client to request resources/updated notifications from the server whenever a particular resource changes.

Link copied to clipboard

DSL builder for constructing SubscribeRequest instances.

Link copied to clipboard
data class SubscribeRequestParams(val uri: String, val meta: RequestMeta? = null) : RequestParams

Parameters for a resources/subscribe request.

Link copied to clipboard
data class Task(val taskId: String, val status: TaskStatus, val statusMessage: String? = null, val createdAt: String, val lastUpdatedAt: String, val ttl: Long?, val pollInterval: Long? = null) : TaskFields

Data associated with a task.

Link copied to clipboard
sealed interface TaskFields

Common fields shared by all types representing the task state.

Link copied to clipboard
data class TaskMetadata(val ttl: Long? = null)

Metadata for augmenting a request with task execution. Include this in the task field of the request parameters.

Link copied to clipboard

The status of a task.

Link copied to clipboard

An optional notification from the receiver to the requestor, informing them that a task’s status has changed. Receivers are not required to send these notifications.

Link copied to clipboard
data class TaskStatusNotificationParams(val taskId: String, val status: TaskStatus, val statusMessage: String? = null, val createdAt: String, val lastUpdatedAt: String, val ttl: Long?, val pollInterval: Long? = null, val meta: JsonObject? = null) : NotificationParams, TaskFields

Parameters for a notifications/tasks/status notification.

Link copied to clipboard

Indicates whether a tool supports task-augmented execution.

Link copied to clipboard
data class TextContent(val text: String, val annotations: Annotations? = null, val meta: JsonObject? = null) : MediaContent

Text provided to or from an LLM.

Link copied to clipboard

DSL builder for constructing TextContent instances.

Link copied to clipboard
data class TextResourceContents(val text: String, val uri: String, val mimeType: String? = null, val meta: JsonObject? = null) : ResourceContents

Represents the text contents of a resource.

Link copied to clipboard
data class TitledMultiSelectEnumSchema(val title: String? = null, val description: String? = null, val minItems: Int? = null, val maxItems: Int? = null, val items: TitledMultiSelectEnumSchema.Items, val default: List<String>? = null) : MultiSelectEnumSchema

Defines a multiple-selection enumeration with display titles for each option.

Link copied to clipboard
data class TitledSingleSelectEnumSchema(val title: String? = null, val description: String? = null, val oneOf: List<EnumOption>, val default: String? = null) : SingleSelectEnumSchema

Defines a single-selection enumeration with display titles for each option.

Link copied to clipboard
data class Tool(val name: String, val inputSchema: ToolSchema, val description: String? = null, val outputSchema: ToolSchema? = null, val title: String? = null, val annotations: ToolAnnotations? = null, val icons: List<Icon>? = null, val execution: ToolExecution? = null, val meta: JsonObject? = null) : WithMeta

Definition for a tool the client can call.

Link copied to clipboard
data class ToolAnnotations(val title: String? = null, val readOnlyHint: Boolean? = null, val destructiveHint: Boolean? = null, val idempotentHint: Boolean? = null, val openWorldHint: Boolean? = null)

Additional properties describing a Tool to clients.

Link copied to clipboard
data class ToolExecution(val taskSupport: TaskSupport? = null)

Execution-related properties for a tool.

Link copied to clipboard

An optional notification from the server to the client, informing it that the list of tools it offers has changed.

Link copied to clipboard
data class ToolSchema(val properties: JsonObject? = null, val required: List<String>? = null, val defs: JsonObject? = null)

A JSON Schema for tool input or output parameters.

Link copied to clipboard
data class UnknownResourceContents(val uri: String, val mimeType: String? = null, val meta: JsonObject? = null) : ResourceContents

Represents resource contents with unknown or unspecified data.

Link copied to clipboard

Sent from the client to request cancellation of resources/updated notifications from the server.

Link copied to clipboard

DSL builder for constructing UnsubscribeRequest instances.

Link copied to clipboard
data class UnsubscribeRequestParams(val uri: String, val meta: RequestMeta? = null) : RequestParams

Parameters for a resources/unsubscribe request.

Link copied to clipboard
data class UntitledMultiSelectEnumSchema(val title: String? = null, val description: String? = null, val minItems: Int? = null, val maxItems: Int? = null, val items: UntitledMultiSelectEnumSchema.Items, val default: List<String>? = null) : MultiSelectEnumSchema

Defines a multiple-selection enumeration without display titles for options.

Link copied to clipboard
data class UntitledSingleSelectEnumSchema(val title: String? = null, val description: String? = null, val enumValues: List<String>, val default: String? = null) : SingleSelectEnumSchema

Defines a single-selection enumeration without display titles for options.

Link copied to clipboard
sealed interface WithMeta

Represents an entity that includes additional metadata in its responses.

Properties

Link copied to clipboard

The default protocol version used when negotiation is not performed.

Link copied to clipboard

Reusable empty JsonObject instance.

Link copied to clipboard

JSON-RPC protocol version used by MCP ("2.0").

Link copied to clipboard

The latest supported MCP protocol version string.

Link copied to clipboard

Pre-configured Json instance for MCP serialization.

Link copied to clipboard

The key used in _meta to associate a message with a task.

Link copied to clipboard

All MCP protocol versions supported by this SDK.

Functions

Link copied to clipboard

Adds an assistant message with simple text content.

Link copied to clipboard

Adds an assistant message with audio content.

Link copied to clipboard

Adds an assistant message with image content.

Link copied to clipboard

Adds an assistant message with text content using a DSL builder.

Link copied to clipboard

Creates a CallToolRequest using a type-safe DSL builder.

Link copied to clipboard

Creates a CompleteRequest using a type-safe DSL builder.

Link copied to clipboard
Link copied to clipboard

Creates an ElicitRequest using a type-safe DSL builder.

Link copied to clipboard

Creates a GetPromptRequest using a type-safe DSL builder.

Link copied to clipboard

Creates an InitializeRequest using a type-safe DSL builder.

Link copied to clipboard

Creates a ListPromptsRequest using a type-safe DSL builder.

Link copied to clipboard
Link copied to clipboard

Creates a ListRootsRequest using a type-safe DSL builder.

Link copied to clipboard

Creates a ListToolsRequest using a type-safe DSL builder.

Link copied to clipboard

Creates a PingRequest using a type-safe DSL builder.

Link copied to clipboard
Link copied to clipboard

Creates a SetLevelRequest using a type-safe DSL builder.

Link copied to clipboard

Creates a SubscribeRequest using a type-safe DSL builder.

Link copied to clipboard

Creates an UnsubscribeRequest using a type-safe DSL builder.

Link copied to clipboard

Creates an ElicitRequestFormParams for backwards compatibility.

Link copied to clipboard
fun ERROR CLASS: Symbol not found for CallToolResult.Companion.error(content: String, meta: JsonObject? = null): CallToolResult

Creates a CallToolResult with single TextContent and meta, with isError being true.

Link copied to clipboard

Decodes a JSON-RPC request into a protocol-specific Request.

Link copied to clipboard

Creates a ProgressToken from a numeric value.

Creates a ProgressToken from a string value.

Link copied to clipboard
fun RequestId(value: Long): RequestId

Creates a RequestId instance using the given numeric value.

Creates a RequestId instance using the provided string value.

Link copied to clipboard
fun ERROR CLASS: Symbol not found for CallToolResult.Companion.success(content: String, meta: JsonObject? = null): CallToolResult

Creates a CallToolResult with single TextContent and meta.

Link copied to clipboard

Converts the notification to a JSON-RPC notification.

Converts the request to a JSON-RPC request.

Link copied to clipboard

Converts a Map with String keys and nullable Any values into a Map with String keys and JsonElement values.

Link copied to clipboard

Adds a user message with simple text content.

Link copied to clipboard

Adds a user message with audio content.

Link copied to clipboard

Adds a user message with image content.

Link copied to clipboard

Adds a user message with text content using a DSL builder.