Package-level declarations

Types

Link copied to clipboard
interface Annotated
Link copied to clipboard
@Serializable
data class Annotations(val audience: List<Role>? = null, val priority: Double? = null)
Link copied to clipboard
@Serializable
@SerialName(value = "notifications/cancelled")
data class CancelledNotification(val params: CancelledNotification.CancelledParams) : JsonRpcNotification

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

Link copied to clipboard
@Serializable
class EmptyParams
Link copied to clipboard
@Serializable
data class EmptyResult(val _meta: Map<String, JsonElement>? = null) : Result
Link copied to clipboard
@Serializable
data class JsonRpcError(val code: Int, val message: String, val data: JsonElement? = null)
Link copied to clipboard
Link copied to clipboard
interface JsonRpcMessage
Link copied to clipboard
@Serializable
abstract class JsonRpcNotification : JsonRpcMessage

Base class for all JSON-RPC notifications. Notifications do not have an ID and do not expect a response.

Link copied to clipboard
@Serializable
abstract class JsonRpcRequest : JsonRpcMessage
Link copied to clipboard
@Serializable
data class JsonRpcResponse(val jsonrpc: String = JSON_RPC_VERSION, val id: String, val result: JsonElement? = null, val error: JsonRpcError? = null) : JsonRpcMessage
Link copied to clipboard

Base parameters for a notification. Notifications can have _meta and other fields depending on the subtype.

Link copied to clipboard

For paginated results, the schema defines PaginatedResult extending Result with an optional nextCursor field.

Link copied to clipboard
@Serializable
@SerialName(value = "ping")
data class PingRequest(val id: String, val params: PingRequest.PingParams? = null) : JsonRpcRequest
Link copied to clipboard
@Serializable
@SerialName(value = "notifications/progress")
data class ProgressNotification(val params: ProgressNotification.ProgressParams) : JsonRpcNotification
Link copied to clipboard
interface Result

Base interface for all result types from MCP responses. The schema states Result can have an optional _meta field. We'll model it as an optional Map.

Link copied to clipboard
@Serializable
enum Role : Enum<Role>