{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JsonRpcMessage_for_ServerRequest_and_ServerResult_and_ServerNotification",
"description": "Represents any JSON-RPC message that can be sent or received.\n\nThis enum covers all possible message types in the JSON-RPC protocol: individual requests/responses, notifications, batch operations, and errors. It serves as the top-level message container for MCP communication.",
"anyOf": [
{
"description": "A single request expecting a response",
"allOf": [
{
"$ref": "#/definitions/JsonRpcRequest_for_ServerRequest"
}
]
},
{
"description": "A response to a previous request",
"allOf": [
{
"$ref": "#/definitions/JsonRpcResponse_for_ServerResult"
}
]
},
{
"description": "A one-way notification (no response expected)",
"allOf": [
{
"$ref": "#/definitions/JsonRpcNotification_for_ServerNotification"
}
]
},
{
"description": "Multiple requests sent together",
"type": "array",
"items": {
"$ref": "#/definitions/JsonRpcBatchRequestItem_for_ServerRequest_and_ServerNotification"
}
},
{
"description": "Multiple responses sent together",
"type": "array",
"items": {
"$ref": "#/definitions/JsonRpcBatchResponseItem_for_ServerResult"
}
},
{
"description": "An error response",
"allOf": [
{
"$ref": "#/definitions/JsonRpcError"
}
]
}
],
"definitions": {
"Annotated_for_RawContent": {
"type": "object",
"oneOf": [
{
"type": "object",
"required": [
"text",
"type"
],
"properties": {
"text": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"text"
]
}
}
},
{
"type": "object",
"required": [
"data",
"mimeType",
"type"
],
"properties": {
"data": {
"description": "The base64-encoded image",
"type": "string"
},
"mimeType": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"image"
]
}
}
},
{
"type": "object",
"required": [
"resource",
"type"
],
"properties": {
"resource": {
"$ref": "#/definitions/ResourceContents"
},
"type": {
"type": "string",
"enum": [
"resource"
]
}
}
},
{
"type": "object",
"required": [
"data",
"mimeType",
"type"
],
"properties": {
"annotations": {
"anyOf": [
{
"$ref": "#/definitions/Annotations"
},
{
"type": "null"
}
]
},
"data": {
"type": "string"
},
"mimeType": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"audio"
]
}
}
}
],
"properties": {
"annotations": {
"anyOf": [
{
"$ref": "#/definitions/Annotations"
},
{
"type": "null"
}
]
}
}
},
"Annotated_for_RawEmbeddedResource": {
"type": "object",
"required": [
"resource"
],
"properties": {
"annotations": {
"anyOf": [
{
"$ref": "#/definitions/Annotations"
},
{
"type": "null"
}
]
},
"resource": {
"$ref": "#/definitions/ResourceContents"
}
}
},
"Annotated_for_RawResource": {
"description": "Represents a resource in the extension with metadata",
"type": "object",
"required": [
"name",
"uri"
],
"properties": {
"annotations": {
"anyOf": [
{
"$ref": "#/definitions/Annotations"
},
{
"type": "null"
}
]
},
"description": {
"description": "Optional description of the resource",
"type": [
"string",
"null"
]
},
"mimeType": {
"description": "MIME type of the resource content (\"text\" or \"blob\")",
"type": [
"string",
"null"
]
},
"name": {
"description": "Name of the resource",
"type": "string"
},
"size": {
"description": "The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.\n\nThis can be used by Hosts to display file sizes and estimate context window us",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"uri": {
"description": "URI representing the resource location (e.g., \"file:///path/to/file\" or \"str:///content\")",
"type": "string"
}
}
},
"Annotated_for_RawResourceTemplate": {
"type": "object",
"required": [
"name",
"uriTemplate"
],
"properties": {
"annotations": {
"anyOf": [
{
"$ref": "#/definitions/Annotations"
},
{
"type": "null"
}
]
},
"description": {
"type": [
"string",
"null"
]
},
"mimeType": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"uriTemplate": {
"type": "string"
}
}
},
"Annotations": {
"type": "object",
"properties": {
"audience": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Role"
}
},
"priority": {
"type": [
"number",
"null"
],
"format": "float"
},
"timestamp": {
"type": [
"string",
"null"
],
"format": "date-time"
}
}
},
"CallToolResult": {
"description": "The result of a tool call operation.\n\nContains the content returned by the tool execution and an optional flag indicating whether the operation resulted in an error.",
"type": "object",
"required": [
"content"
],
"properties": {
"content": {
"description": "The content returned by the tool (text, images, etc.)",
"type": "array",
"items": {
"$ref": "#/definitions/Annotated_for_RawContent"
}
},
"isError": {
"description": "Whether this result represents an error condition",
"type": [
"boolean",
"null"
]
}
}
},
"CancelledNotificationMethod": {
"type": "string",
"format": "const",
"const": "notifications/cancelled"
},
"CancelledNotificationParam": {
"type": "object",
"required": [
"requestId"
],
"properties": {
"reason": {
"type": [
"string",
"null"
]
},
"requestId": {
"$ref": "#/definitions/NumberOrString"
}
}
},
"CompleteResult": {
"type": "object",
"required": [
"completion"
],
"properties": {
"completion": {
"$ref": "#/definitions/CompletionInfo"
}
}
},
"CompletionInfo": {
"type": "object",
"required": [
"values"
],
"properties": {
"hasMore": {
"type": [
"boolean",
"null"
]
},
"total": {
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
},
"values": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"ContextInclusion": {
"description": "Specifies how much context should be included in sampling requests.\n\nThis allows clients to control what additional context information should be provided to the LLM when processing sampling requests.",
"oneOf": [
{
"description": "Include context from all connected MCP servers",
"type": "string",
"enum": [
"allServers"
]
},
{
"description": "Include no additional context",
"type": "string",
"enum": [
"none"
]
},
{
"description": "Include context only from the requesting server",
"type": "string",
"enum": [
"thisServer"
]
}
]
},
"CreateMessageRequestMethod": {
"type": "string",
"format": "const",
"const": "sampling/createMessage"
},
"CreateMessageRequestParam": {
"description": "Parameters for creating a message through LLM sampling.\n\nThis structure contains all the necessary information for a client to generate an LLM response, including conversation history, model preferences, and generation parameters.",
"type": "object",
"required": [
"maxTokens",
"messages"
],
"properties": {
"includeContext": {
"description": "How much context to include from MCP servers",
"anyOf": [
{
"$ref": "#/definitions/ContextInclusion"
},
{
"type": "null"
}
]
},
"maxTokens": {
"description": "Maximum number of tokens to generate",
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"messages": {
"description": "The conversation history and current messages",
"type": "array",
"items": {
"$ref": "#/definitions/SamplingMessage"
}
},
"metadata": {
"description": "Additional metadata for the request"
},
"modelPreferences": {
"description": "Preferences for model selection and behavior",
"anyOf": [
{
"$ref": "#/definitions/ModelPreferences"
},
{
"type": "null"
}
]
},
"stopSequences": {
"description": "Sequences that should stop generation",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"systemPrompt": {
"description": "System prompt to guide the model's behavior",
"type": [
"string",
"null"
]
},
"temperature": {
"description": "Temperature for controlling randomness (0.0 to 1.0)",
"type": [
"number",
"null"
],
"format": "float"
}
}
},
"EmptyObject": {
"description": "This is commonly used for representing empty objects in MCP messages.\n\nwithout returning any specific data.",
"type": "object"
},
"ErrorData": {
"description": "Error information for JSON-RPC error responses.\n\nThis structure follows the JSON-RPC 2.0 specification for error reporting, providing a standardized way to communicate errors between clients and servers.",
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"description": "The error type that occurred (using standard JSON-RPC error codes)",
"type": "integer",
"format": "int32"
},
"data": {
"description": "Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.)."
},
"message": {
"description": "A short description of the error. The message SHOULD be limited to a concise single sentence.",
"type": "string"
}
}
},
"GetPromptResult": {
"type": "object",
"required": [
"messages"
],
"properties": {
"description": {
"type": [
"string",
"null"
]
},
"messages": {
"type": "array",
"items": {
"$ref": "#/definitions/PromptMessage"
}
}
}
},
"Implementation": {
"type": "object",
"required": [
"name",
"version"
],
"properties": {
"name": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"InitializeResult": {
"description": "The server's response to an initialization request.\n\nContains the server's protocol version, capabilities, and implementation information, along with optional instructions for the client.",
"type": "object",
"required": [
"capabilities",
"protocolVersion",
"serverInfo"
],
"properties": {
"capabilities": {
"description": "The capabilities this server provides (tools, resources, prompts, etc.)",
"allOf": [
{
"$ref": "#/definitions/ServerCapabilities"
}
]
},
"instructions": {
"description": "Optional human-readable instructions about using this server",
"type": [
"string",
"null"
]
},
"protocolVersion": {
"description": "The MCP protocol version this server supports",
"allOf": [
{
"$ref": "#/definitions/ProtocolVersion"
}
]
},
"serverInfo": {
"description": "Information about the server implementation",
"allOf": [
{
"$ref": "#/definitions/Implementation"
}
]
}
}
},
"JsonRpcBatchRequestItem_for_ServerRequest_and_ServerNotification": {
"anyOf": [
{
"$ref": "#/definitions/JsonRpcRequest_for_ServerRequest"
},
{
"$ref": "#/definitions/JsonRpcNotification_for_ServerNotification"
}
]
},
"JsonRpcBatchResponseItem_for_ServerResult": {
"anyOf": [
{
"$ref": "#/definitions/JsonRpcResponse_for_ServerResult"
},
{
"$ref": "#/definitions/JsonRpcError"
}
]
},
"JsonRpcError": {
"type": "object",
"required": [
"error",
"id",
"jsonrpc"
],
"properties": {
"error": {
"$ref": "#/definitions/ErrorData"
},
"id": {
"$ref": "#/definitions/NumberOrString"
},
"jsonrpc": {
"$ref": "#/definitions/JsonRpcVersion2_0"
}
}
},
"JsonRpcNotification_for_ServerNotification": {
"type": "object",
"anyOf": [
{
"$ref": "#/definitions/Notification_for_CancelledNotificationMethod_and_CancelledNotificationParam"
},
{
"$ref": "#/definitions/Notification_for_ProgressNotificationMethod_and_ProgressNotificationParam"
},
{
"$ref": "#/definitions/Notification_for_LoggingMessageNotificationMethod_and_LoggingMessageNotificationParam"
},
{
"$ref": "#/definitions/Notification_for_ResourceUpdatedNotificationMethod_and_ResourceUpdatedNotificationParam"
},
{
"$ref": "#/definitions/NotificationNoParam_for_ResourceListChangedNotificationMethod"
},
{
"$ref": "#/definitions/NotificationNoParam_for_ToolListChangedNotificationMethod"
},
{
"$ref": "#/definitions/NotificationNoParam_for_PromptListChangedNotificationMethod"
}
],
"required": [
"jsonrpc"
],
"properties": {
"jsonrpc": {
"$ref": "#/definitions/JsonRpcVersion2_0"
}
}
},
"JsonRpcRequest_for_ServerRequest": {
"type": "object",
"anyOf": [
{
"$ref": "#/definitions/RequestNoParam_for_PingRequestMethod"
},
{
"$ref": "#/definitions/Request_for_CreateMessageRequestMethod_and_CreateMessageRequestParam"
},
{
"$ref": "#/definitions/RequestNoParam_for_ListRootsRequestMethod"
}
],
"required": [
"id",
"jsonrpc"
],
"properties": {
"id": {
"$ref": "#/definitions/NumberOrString"
},
"jsonrpc": {
"$ref": "#/definitions/JsonRpcVersion2_0"
}
}
},
"JsonRpcResponse_for_ServerResult": {
"type": "object",
"required": [
"id",
"jsonrpc",
"result"
],
"properties": {
"id": {
"$ref": "#/definitions/NumberOrString"
},
"jsonrpc": {
"$ref": "#/definitions/JsonRpcVersion2_0"
},
"result": {
"$ref": "#/definitions/ServerResult"
}
}
},
"JsonRpcVersion2_0": {
"type": "string",
"format": "const",
"const": "2.0"
},
"ListPromptsResult": {
"type": "object",
"required": [
"prompts"
],
"properties": {
"nextCursor": {
"type": [
"string",
"null"
]
},
"prompts": {
"type": "array",
"items": {
"$ref": "#/definitions/Prompt"
}
}
}
},
"ListResourceTemplatesResult": {
"type": "object",
"required": [
"resourceTemplates"
],
"properties": {
"nextCursor": {
"type": [
"string",
"null"
]
},
"resourceTemplates": {
"type": "array",
"items": {
"$ref": "#/definitions/Annotated_for_RawResourceTemplate"
}
}
}
},
"ListResourcesResult": {
"type": "object",
"required": [
"resources"
],
"properties": {
"nextCursor": {
"type": [
"string",
"null"
]
},
"resources": {
"type": "array",
"items": {
"$ref": "#/definitions/Annotated_for_RawResource"
}
}
}
},
"ListRootsRequestMethod": {
"type": "string",
"format": "const",
"const": "roots/list"
},
"ListToolsResult": {
"type": "object",
"required": [
"tools"
],
"properties": {
"nextCursor": {
"type": [
"string",
"null"
]
},
"tools": {
"type": "array",
"items": {
"$ref": "#/definitions/Tool"
}
}
}
},
"LoggingLevel": {
"description": "Logging levels supported by the MCP protocol",
"type": "string",
"enum": [
"debug",
"info",
"notice",
"warning",
"error",
"critical",
"alert",
"emergency"
]
},
"LoggingMessageNotificationMethod": {
"type": "string",
"format": "const",
"const": "notifications/message"
},
"LoggingMessageNotificationParam": {
"description": "Parameters for a logging message notification",
"type": "object",
"required": [
"data",
"level"
],
"properties": {
"data": {
"description": "The actual log data"
},
"level": {
"description": "The severity level of this log message",
"allOf": [
{
"$ref": "#/definitions/LoggingLevel"
}
]
},
"logger": {
"description": "Optional logger name that generated this message",
"type": [
"string",
"null"
]
}
}
},
"ModelHint": {
"description": "A hint suggesting a preferred model name or family.\n\nModel hints are advisory suggestions that help clients choose appropriate models. They can be specific model names or general families like \"claude\" or \"gpt\".",
"type": "object",
"properties": {
"name": {
"description": "The suggested model name or family identifier",
"type": [
"string",
"null"
]
}
}
},
"ModelPreferences": {
"description": "Preferences for model selection and behavior in sampling requests.\n\nThis allows servers to express their preferences for which model to use and how to balance different priorities when the client has multiple model options available.",
"type": "object",
"properties": {
"costPriority": {
"description": "Priority for cost optimization (0.0 to 1.0, higher = prefer cheaper models)",
"type": [
"number",
"null"
],
"format": "float"
},
"hints": {
"description": "Specific model names or families to prefer (e.g., \"claude\", \"gpt\")",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/ModelHint"
}
},
"intelligencePriority": {
"description": "Priority for intelligence/capability (0.0 to 1.0, higher = prefer more capable models)",
"type": [
"number",
"null"
],
"format": "float"
},
"speedPriority": {
"description": "Priority for speed/latency (0.0 to 1.0, higher = prefer faster models)",
"type": [
"number",
"null"
],
"format": "float"
}
}
},
"NotificationNoParam_for_PromptListChangedNotificationMethod": {
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"$ref": "#/definitions/PromptListChangedNotificationMethod"
}
}
},
"NotificationNoParam_for_ResourceListChangedNotificationMethod": {
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"$ref": "#/definitions/ResourceListChangedNotificationMethod"
}
}
},
"NotificationNoParam_for_ToolListChangedNotificationMethod": {
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"$ref": "#/definitions/ToolListChangedNotificationMethod"
}
}
},
"Notification_for_CancelledNotificationMethod_and_CancelledNotificationParam": {
"type": "object",
"required": [
"method",
"params"
],
"properties": {
"method": {
"$ref": "#/definitions/CancelledNotificationMethod"
},
"params": {
"$ref": "#/definitions/CancelledNotificationParam"
}
}
},
"Notification_for_LoggingMessageNotificationMethod_and_LoggingMessageNotificationParam": {
"type": "object",
"required": [
"method",
"params"
],
"properties": {
"method": {
"$ref": "#/definitions/LoggingMessageNotificationMethod"
},
"params": {
"$ref": "#/definitions/LoggingMessageNotificationParam"
}
}
},
"Notification_for_ProgressNotificationMethod_and_ProgressNotificationParam": {
"type": "object",
"required": [
"method",
"params"
],
"properties": {
"method": {
"$ref": "#/definitions/ProgressNotificationMethod"
},
"params": {
"$ref": "#/definitions/ProgressNotificationParam"
}
}
},
"Notification_for_ResourceUpdatedNotificationMethod_and_ResourceUpdatedNotificationParam": {
"type": "object",
"required": [
"method",
"params"
],
"properties": {
"method": {
"$ref": "#/definitions/ResourceUpdatedNotificationMethod"
},
"params": {
"$ref": "#/definitions/ResourceUpdatedNotificationParam"
}
}
},
"NumberOrString": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
"PingRequestMethod": {
"type": "string",
"format": "const",
"const": "ping"
},
"ProgressNotificationMethod": {
"type": "string",
"format": "const",
"const": "notifications/progress"
},
"ProgressNotificationParam": {
"type": "object",
"required": [
"progress",
"progressToken"
],
"properties": {
"message": {
"description": "An optional message describing the current progress.",
"type": [
"string",
"null"
]
},
"progress": {
"description": "The progress thus far. This should increase every time progress is made, even if the total is unknown.",
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"progressToken": {
"$ref": "#/definitions/NumberOrString"
},
"total": {
"description": "Total number of items to process (or total progress required), if known",
"type": [
"integer",
"null"
],
"format": "uint32",
"minimum": 0.0
}
}
},
"Prompt": {
"description": "A prompt that can be used to generate text from a model",
"type": "object",
"required": [
"name"
],
"properties": {
"arguments": {
"description": "Optional arguments that can be passed to customize the prompt",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/PromptArgument"
}
},
"description": {
"description": "Optional description of what the prompt does",
"type": [
"string",
"null"
]
},
"name": {
"description": "The name of the prompt",
"type": "string"
}
}
},
"PromptArgument": {
"description": "Represents a prompt argument that can be passed to customize the prompt",
"type": "object",
"required": [
"name"
],
"properties": {
"description": {
"description": "A description of what the argument is used for",
"type": [
"string",
"null"
]
},
"name": {
"description": "The name of the argument",
"type": "string"
},
"required": {
"description": "Whether this argument is required",
"type": [
"boolean",
"null"
]
}
}
},
"PromptListChangedNotificationMethod": {
"type": "string",
"format": "const",
"const": "notifications/prompts/list_changed"
},
"PromptMessage": {
"description": "A message in a prompt conversation",
"type": "object",
"required": [
"content",
"role"
],
"properties": {
"content": {
"description": "The content of the message",
"allOf": [
{
"$ref": "#/definitions/PromptMessageContent"
}
]
},
"role": {
"description": "The role of the message sender",
"allOf": [
{
"$ref": "#/definitions/PromptMessageRole"
}
]
}
}
},
"PromptMessageContent": {
"description": "Content types that can be included in prompt messages",
"oneOf": [
{
"description": "Plain text content",
"type": "object",
"required": [
"text",
"type"
],
"properties": {
"text": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"text"
]
}
}
},
{
"description": "Image content with base64-encoded data",
"type": "object",
"required": [
"data",
"mimeType",
"type"
],
"properties": {
"annotations": {
"anyOf": [
{
"$ref": "#/definitions/Annotations"
},
{
"type": "null"
}
]
},
"data": {
"description": "The base64-encoded image",
"type": "string"
},
"mimeType": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"image"
]
}
}
},
{
"description": "Embedded server-side resource",
"type": "object",
"required": [
"resource",
"type"
],
"properties": {
"resource": {
"$ref": "#/definitions/Annotated_for_RawEmbeddedResource"
},
"type": {
"type": "string",
"enum": [
"resource"
]
}
}
}
]
},
"PromptMessageRole": {
"description": "Represents the role of a message sender in a prompt conversation",
"type": "string",
"enum": [
"user",
"assistant"
]
},
"PromptsCapability": {
"type": "object",
"properties": {
"listChanged": {
"type": [
"boolean",
"null"
]
}
}
},
"ProtocolVersion": {
"description": "Represents the MCP protocol version used for communication.\n\nThis ensures compatibility between clients and servers by specifying which version of the Model Context Protocol is being used.",
"type": "string"
},
"ReadResourceResult": {
"description": "Result containing the contents of a read resource",
"type": "object",
"required": [
"contents"
],
"properties": {
"contents": {
"description": "The actual content of the resource",
"type": "array",
"items": {
"$ref": "#/definitions/ResourceContents"
}
}
}
},
"RequestNoParam_for_ListRootsRequestMethod": {
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"$ref": "#/definitions/ListRootsRequestMethod"
}
}
},
"RequestNoParam_for_PingRequestMethod": {
"type": "object",
"required": [
"method"
],
"properties": {
"method": {
"$ref": "#/definitions/PingRequestMethod"
}
}
},
"Request_for_CreateMessageRequestMethod_and_CreateMessageRequestParam": {
"description": "Represents a JSON-RPC request with method, parameters, and extensions.\n\nThis is the core structure for all MCP requests, containing: - `method`: The name of the method being called - `params`: The parameters for the method - `extensions`: Additional context data (similar to HTTP headers)",
"type": "object",
"required": [
"method",
"params"
],
"properties": {
"method": {
"$ref": "#/definitions/CreateMessageRequestMethod"
},
"params": {
"$ref": "#/definitions/CreateMessageRequestParam"
}
}
},
"ResourceContents": {
"anyOf": [
{
"type": "object",
"required": [
"text",
"uri"
],
"properties": {
"mime_type": {
"type": [
"string",
"null"
]
},
"text": {
"type": "string"
},
"uri": {
"type": "string"
}
}
},
{
"type": "object",
"required": [
"blob",
"uri"
],
"properties": {
"blob": {
"type": "string"
},
"mime_type": {
"type": [
"string",
"null"
]
},
"uri": {
"type": "string"
}
}
}
]
},
"ResourceListChangedNotificationMethod": {
"type": "string",
"format": "const",
"const": "notifications/resources/list_changed"
},
"ResourceUpdatedNotificationMethod": {
"type": "string",
"format": "const",
"const": "notifications/resources/updated"
},
"ResourceUpdatedNotificationParam": {
"description": "Parameters for a resource update notification",
"type": "object",
"required": [
"uri"
],
"properties": {
"uri": {
"description": "The URI of the resource that was updated",
"type": "string"
}
}
},
"ResourcesCapability": {
"type": "object",
"properties": {
"listChanged": {
"type": [
"boolean",
"null"
]
},
"subscribe": {
"type": [
"boolean",
"null"
]
}
}
},
"Role": {
"description": "Represents the role of a participant in a conversation or message exchange.\n\nUsed in sampling and chat contexts to distinguish between different types of message senders in the conversation flow.",
"oneOf": [
{
"description": "A human user or client making a request",
"type": "string",
"enum": [
"user"
]
},
{
"description": "An AI assistant or server providing a response",
"type": "string",
"enum": [
"assistant"
]
}
]
},
"SamplingMessage": {
"description": "A message in a sampling conversation, containing a role and content.\n\nThis represents a single message in a conversation flow, used primarily in LLM sampling requests where the conversation history is important for generating appropriate responses.",
"type": "object",
"required": [
"content",
"role"
],
"properties": {
"content": {
"description": "The actual content of the message (text, image, etc.)",
"allOf": [
{
"$ref": "#/definitions/Annotated_for_RawContent"
}
]
},
"role": {
"description": "The role of the message sender (User or Assistant)",
"allOf": [
{
"$ref": "#/definitions/Role"
}
]
}
}
},
"ServerCapabilities": {
"title": "Builder",
"description": "```rust # use rmcp::model::ServerCapabilities; let cap = ServerCapabilities::builder() .enable_logging() .enable_experimental() .enable_prompts() .enable_resources() .enable_tools() .enable_tool_list_changed() .build(); ```",
"type": "object",
"properties": {
"completions": {
"type": [
"object",
"null"
],
"additionalProperties": true
},
"experimental": {
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "object",
"additionalProperties": true
}
},
"logging": {
"type": [
"object",
"null"
],
"additionalProperties": true
},
"prompts": {
"anyOf": [
{
"$ref": "#/definitions/PromptsCapability"
},
{
"type": "null"
}
]
},
"resources": {
"anyOf": [
{
"$ref": "#/definitions/ResourcesCapability"
},
{
"type": "null"
}
]
},
"tools": {
"anyOf": [
{
"$ref": "#/definitions/ToolsCapability"
},
{
"type": "null"
}
]
}
}
},
"ServerResult": {
"anyOf": [
{
"$ref": "#/definitions/InitializeResult"
},
{
"$ref": "#/definitions/CompleteResult"
},
{
"$ref": "#/definitions/GetPromptResult"
},
{
"$ref": "#/definitions/ListPromptsResult"
},
{
"$ref": "#/definitions/ListResourcesResult"
},
{
"$ref": "#/definitions/ListResourceTemplatesResult"
},
{
"$ref": "#/definitions/ReadResourceResult"
},
{
"$ref": "#/definitions/CallToolResult"
},
{
"$ref": "#/definitions/ListToolsResult"
},
{
"$ref": "#/definitions/EmptyObject"
}
]
},
"Tool": {
"description": "A tool that can be used by a model.",
"type": "object",
"required": [
"inputSchema",
"name"
],
"properties": {
"annotations": {
"description": "Optional additional tool information.",
"anyOf": [
{
"$ref": "#/definitions/ToolAnnotations"
},
{
"type": "null"
}
]
},
"description": {
"description": "A description of what the tool does",
"type": [
"string",
"null"
]
},
"inputSchema": {
"description": "A JSON Schema object defining the expected parameters for the tool",
"type": "object",
"additionalProperties": true
},
"name": {
"description": "The name of the tool",
"type": "string"
}
}
},
"ToolAnnotations": {
"description": "Additional properties describing a Tool to clients.\n\nNOTE: all properties in ToolAnnotations are **hints**. They are not guaranteed to provide a faithful description of tool behavior (including descriptive properties like `title`).\n\nClients should never make tool use decisions based on ToolAnnotations received from untrusted servers.",
"type": "object",
"properties": {
"destructiveHint": {
"description": "If true, the tool may perform destructive updates to its environment. If false, the tool performs only additive updates.\n\n(This property is meaningful only when `readOnlyHint == false`)\n\nDefault: true A human-readable description of the tool's purpose.",
"type": [
"boolean",
"null"
]
},
"idempotentHint": {
"description": "If true, calling the tool repeatedly with the same arguments will have no additional effect on the its environment.\n\n(This property is meaningful only when `readOnlyHint == false`)\n\nDefault: false.",
"type": [
"boolean",
"null"
]
},
"openWorldHint": {
"description": "If true, this tool may interact with an \"open world\" of external entities. If false, the tool's domain of interaction is closed. For example, the world of a web search tool is open, whereas that of a memory tool is not.\n\nDefault: true",
"type": [
"boolean",
"null"
]
},
"readOnlyHint": {
"description": "If true, the tool does not modify its environment.\n\nDefault: false",
"type": [
"boolean",
"null"
]
},
"title": {
"description": "A human-readable title for the tool.",
"type": [
"string",
"null"
]
}
}
},
"ToolListChangedNotificationMethod": {
"type": "string",
"format": "const",
"const": "notifications/tools/list_changed"
},
"ToolsCapability": {
"type": "object",
"properties": {
"listChanged": {
"type": [
"boolean",
"null"
]
}
}
}
}
}