Module mcp

Source

Structs§

Annotations
Optional annotations for the client. The client can use annotations to inform how objects are used or displayed
AudioContent
Audio provided to or from an LLM.
BlobResourceContents
Generated from JSON schema definition for BlobResourceContents
CallToolRequest
Used by the client to invoke a tool provided by the server.
CallToolRequestParams
Generated from JSON schema definition for CallToolRequestParams
CallToolResult
The server’s response to a tool call.
CancelledNotification
This notification can be sent by either side to indicate that it is cancelling a previously-issued request.
CancelledNotificationParams
Generated from JSON schema definition for CancelledNotificationParams
ClientCapabilities
Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities.
ClientCapabilitiesRoots
Present if the client supports listing roots.
CompleteRequest
A request from the client to the server, to ask for completion options.
CompleteRequestParams
Generated from JSON schema definition for CompleteRequestParams
CompleteRequestParamsArgument
The argument’s information
CompleteResult
The server’s response to a completion/complete request
CompleteResultCompletion
Generated from JSON schema definition for CompleteResultCompletion
CreateMessageRequest
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.
CreateMessageRequestParams
Generated from JSON schema definition for CreateMessageRequestParams
CreateMessageResult
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.
Cursor
An opaque token used to represent a cursor for pagination.
EmbeddedResource
The contents of a resource, embedded into a prompt or tool call result.
EmptyResult
Generated from JSON schema definition for EmptyResult
GetPromptRequest
Used by the client to get a prompt provided by the server.
GetPromptRequestParams
Generated from JSON schema definition for GetPromptRequestParams
GetPromptResult
The server’s response to a prompts/get request from the client.
ImageContent
An image provided to or from an LLM.
Implementation
Describes the name and version of an MCP implementation.
InitializeRequest
This request is sent from the client to the server when it first connects, asking it to begin initialization.
InitializeRequestParams
Generated from JSON schema definition for InitializeRequestParams
InitializeResult
After receiving an initialize request from the client, the server sends this response.
InitializedNotification
This notification is sent from the client to the server after initialization has finished.
InitializedNotificationParams
Generated from JSON schema definition for InitializedNotificationParams
JSONRPCBatchRequest
A JSON-RPC batch request, as described in https://www.jsonrpc.org/specification#batch.
JSONRPCBatchResponse
A JSON-RPC batch response, as described in https://www.jsonrpc.org/specification#batch.
JSONRPCError
A response to a request that indicates an error occurred.
JSONRPCNotification
A notification which does not expect a response.
JSONRPCRequest
A request that expects a response.
JSONRPCResponse
A successful (non-error) response to a request.
JsonrpcErrorError
Generated from JSON schema definition for JsonrpcErrorError
JsonrpcNotificationParams
Generated from JSON schema definition for JsonrpcNotificationParams
JsonrpcRequestParams
Generated from JSON schema definition for JsonrpcRequestParams
JsonrpcRequestParamsMeta
Generated from JSON schema definition for JsonrpcRequestParamsMeta
ListPromptsRequest
Sent from the client to request a list of prompts and prompt templates the server has.
ListPromptsRequestParams
Generated from JSON schema definition for ListPromptsRequestParams
ListPromptsResult
The server’s response to a prompts/list request from the client.
ListResourceTemplatesRequest
Sent from the client to request a list of resource templates the server has.
ListResourceTemplatesRequestParams
Generated from JSON schema definition for ListResourceTemplatesRequestParams
ListResourceTemplatesResult
The server’s response to a resources/templates/list request from the client.
ListResourcesRequest
Sent from the client to request a list of resources the server has.
ListResourcesRequestParams
Generated from JSON schema definition for ListResourcesRequestParams
ListResourcesResult
The server’s response to a resources/list request from the client.
ListRootsRequest
Sent from the server to request a list of root URIs from the client. Roots allow servers to ask for specific directories or files to operate on. A common example for roots is providing a set of repositories or directories a server should operate on.
ListRootsRequestParams
Generated from JSON schema definition for ListRootsRequestParams
ListRootsRequestParamsMeta
Generated from JSON schema definition for ListRootsRequestParamsMeta
ListRootsResult
The client’s response to a roots/list request from the server. This result contains an array of Root objects, each representing a root directory or file that the server can operate on.
ListToolsRequest
Sent from the client to request a list of tools the server has.
ListToolsRequestParams
Generated from JSON schema definition for ListToolsRequestParams
ListToolsResult
The server’s response to a tools/list request from the client.
LoggingMessageNotification
Notification of a log message passed from server to client. If no logging/setLevel request has been sent from the client, the server MAY decide which messages to send automatically.
LoggingMessageNotificationParams
Generated from JSON schema definition for LoggingMessageNotificationParams
ModelHint
Hints to use for model selection.
ModelPreferences
The server’s preferences for model selection, requested of the client during sampling.
Notification
Generated from JSON schema definition for Notification
NotificationParams
Generated from JSON schema definition for NotificationParams
PaginatedRequest
Generated from JSON schema definition for PaginatedRequest
PaginatedRequestParams
Generated from JSON schema definition for PaginatedRequestParams
PaginatedResult
Generated from JSON schema definition for PaginatedResult
PingRequest
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 may be disconnected.
PingRequestParams
Generated from JSON schema definition for PingRequestParams
PingRequestParamsMeta
Generated from JSON schema definition for PingRequestParamsMeta
ProgressNotification
An out-of-band notification used to inform the receiver of a progress update for a long-running request.
ProgressNotificationParams
Generated from JSON schema definition for ProgressNotificationParams
Prompt
A prompt or prompt template that the server offers.
PromptArgument
Describes an argument that a prompt can accept.
PromptListChangedNotification
An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This may be issued by servers without any previous subscription from the client.
PromptListChangedNotificationParams
Generated from JSON schema definition for PromptListChangedNotificationParams
PromptMessage
Describes a message returned as part of a prompt.
PromptReference
Identifies a prompt.
ReadResourceRequest
Sent from the client to the server, to read a specific resource URI.
ReadResourceRequestParams
Generated from JSON schema definition for ReadResourceRequestParams
ReadResourceResult
The server’s response to a resources/read request from the client.
Request
Generated from JSON schema definition for Request
RequestParams
Generated from JSON schema definition for RequestParams
RequestParamsMeta
Generated from JSON schema definition for RequestParamsMeta
Resource
A known resource that the server is capable of reading.
ResourceContents
The contents of a specific resource or sub-resource.
ResourceListChangedNotification
An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This may be issued by servers without any previous subscription from the client.
ResourceListChangedNotificationParams
Generated from JSON schema definition for ResourceListChangedNotificationParams
ResourceReference
A reference to a resource or resource template definition.
ResourceTemplate
A template description for resources available on the server.
ResourceUpdatedNotification
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.
ResourceUpdatedNotificationParams
Generated from JSON schema definition for ResourceUpdatedNotificationParams
Result
Generated from JSON schema definition for Result
Root
Represents a root directory or file that the server can operate on.
RootsListChangedNotification
A notification from the client to the server, informing it that the list of roots has changed. This notification should be sent whenever the client adds, removes, or modifies any root. The server should then request an updated list of roots using the ListRootsRequest.
RootsListChangedNotificationParams
Generated from JSON schema definition for RootsListChangedNotificationParams
SamplingMessage
Describes a message issued to or received from an LLM API.
ServerCapabilities
Capabilities that a server may support. Known capabilities are defined here, in this schema, but this is not a closed set: any server can define its own, additional capabilities.
ServerCapabilitiesPrompts
Present if the server offers any prompt templates.
ServerCapabilitiesResources
Present if the server offers any resources to read.
ServerCapabilitiesTools
Present if the server offers any tools to call.
SetLevelRequest
A request from the client to the server, to enable or adjust logging.
SetLevelRequestParams
Generated from JSON schema definition for SetLevelRequestParams
SubscribeRequest
Sent from the client to request resources/updated notifications from the server whenever a particular resource changes.
SubscribeRequestParams
Generated from JSON schema definition for SubscribeRequestParams
TextContent
Text provided to or from an LLM.
TextResourceContents
Generated from JSON schema definition for TextResourceContents
Tool
Definition for a tool the client can call.
ToolAnnotations
Additional properties describing a Tool to clients.
ToolInputSchema
A JSON Schema object defining the expected parameters for the tool.
ToolListChangedNotification
An optional notification from the server to the client, informing it that the list of tools it offers has changed. This may be issued by servers without any previous subscription from the client.
ToolListChangedNotificationParams
Generated from JSON schema definition for ToolListChangedNotificationParams
UnsubscribeRequest
Sent from the client to request cancellation of resources/updated notifications from the server. This should follow a previous resources/subscribe request.
UnsubscribeRequestParams
Generated from JSON schema definition for UnsubscribeRequestParams

Enums§

CallToolResultContent
Generated from JSON schema definition for CallToolResultContent
ClientNotification
Generated from JSON schema definition for ClientNotification
ClientRequest
Generated from JSON schema definition for ClientRequest
ClientResult
Generated from JSON schema definition for ClientResult
CompleteRequestParamsRef
Generated from JSON schema definition for CompleteRequestParamsRef
CreateMessageRequestParamsIncludeContext
A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.
CreateMessageResultContent
Generated from JSON schema definition for CreateMessageResultContent
EmbeddedResourceResource
Generated from JSON schema definition for EmbeddedResourceResource
JSONRPCMessage
Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.
JsonrpcBatchRequestItem
Generated from JSON schema definition for JsonrpcBatchRequestItem
JsonrpcBatchResponseItem
Generated from JSON schema definition for JsonrpcBatchResponseItem
LoggingLevel
The severity of a log message.
ProgressToken
A progress token, used to associate progress notifications with the original request.
PromptMessageContent
Generated from JSON schema definition for PromptMessageContent
ReadResourceResultContents
Generated from JSON schema definition for ReadResourceResultContents
RequestId
A uniquely identifying ID for a request in JSON-RPC.
Role
The sender or recipient of messages and data in a conversation.
SamplingMessageContent
Generated from JSON schema definition for SamplingMessageContent
ServerNotification
Generated from JSON schema definition for ServerNotification
ServerRequest
Generated from JSON schema definition for ServerRequest
ServerResult
Generated from JSON schema definition for ServerResult