Module model

Source
Expand description

Basic data types in MCP specification

Structs§

Annotated
Annotations
ArgumentInfo
CallToolRequestMethod
CallToolRequestParam
Parameters for calling a tool provided by an MCP server.
CallToolResult
The result of a tool call operation.
CancelledNotificationMethod
CancelledNotificationParam
ClientCapabilities
Builder
ClientCapabilitiesBuilder
ClientCapabilitiesBuilderState
CompleteRequestMethod
CompleteRequestParam
CompleteResult
CompletionInfo
CreateMessageRequestMethod
CreateMessageRequestParam
Parameters for creating a message through LLM sampling.
CreateMessageResult
The result of a sampling/createMessage request containing the generated response.
EmptyObject
This is commonly used for representing empty objects in MCP messages.
ErrorCode
Standard JSON-RPC error codes used throughout the MCP protocol.
ErrorData
Error information for JSON-RPC error responses.
Extensions
A type map of protocol extensions.
GetPromptRequestMethod
GetPromptRequestParam
Parameters for retrieving a specific prompt
GetPromptResult
Implementation
InitializeRequestParam
Parameters sent by a client when initializing a connection to an MCP server.
InitializeResult
The server’s response to an initialization request.
InitializeResultMethod
InitializedNotificationMethod
JsonContent
JsonRpcError
JsonRpcNotification
JsonRpcRequest
JsonRpcResponse
JsonRpcVersion2_0
ListPromptsRequestMethod
ListPromptsResult
ListResourceTemplatesRequestMethod
ListResourceTemplatesResult
ListResourcesRequestMethod
ListResourcesResult
ListRootsRequestMethod
ListRootsResult
ListToolsRequestMethod
ListToolsResult
LoggingMessageNotificationMethod
LoggingMessageNotificationParam
Parameters for a logging message notification
Meta
ModelHint
A hint suggesting a preferred model name or family.
ModelPreferences
Preferences for model selection and behavior in sampling requests.
Notification
NotificationNoParam
PaginatedRequestParam
PingRequestMethod
ProgressNotificationMethod
ProgressNotificationParam
ProgressToken
A token used to track the progress of long-running operations.
Prompt
A prompt that can be used to generate text from a model
PromptArgument
Represents a prompt argument that can be passed to customize the prompt
PromptArgumentTemplate
A template for a prompt argument, this should be identical to PromptArgument
PromptListChangedNotificationMethod
PromptMessage
A message in a prompt conversation
PromptReference
PromptTemplate
A template for a prompt
PromptsCapability
ProtocolVersion
Represents the MCP protocol version used for communication.
RawAudioContent
RawEmbeddedResource
RawImageContent
RawResource
Represents a resource in the extension with metadata
RawResourceTemplate
RawTextContent
ReadResourceRequestMethod
ReadResourceRequestParam
Parameters for reading a specific resource
ReadResourceResult
Result containing the contents of a read resource
Request
Represents a JSON-RPC request with method, parameters, and extensions.
RequestNoParam
RequestOptionalParam
ResourceListChangedNotificationMethod
ResourceReference
ResourceUpdatedNotificationMethod
ResourceUpdatedNotificationParam
Parameters for a resource update notification
ResourcesCapability
Root
RootsCapabilities
RootsListChangedNotificationMethod
SamplingMessage
A message in a sampling conversation, containing a role and content.
ServerCapabilities
Builder
ServerCapabilitiesBuilder
ServerCapabilitiesBuilderState
SetLevelRequestMethod
SetLevelRequestParam
Parameters for setting the logging level
SubscribeRequestMethod
SubscribeRequestParam
Parameters for subscribing to resource updates
Tool
A tool that can be used by a model.
ToolAnnotations
Additional properties describing a Tool to clients.
ToolListChangedNotificationMethod
ToolsCapability
UnsubscribeRequestMethod
UnsubscribeRequestParam
Parameters for unsubscribing from resource updates

Enums§

ClientNotification
ClientRequest
ClientResult
ContextInclusion
Specifies how much context should be included in sampling requests.
JsonRpcBatchRequestItem
JsonRpcBatchResponseItem
JsonRpcMessage
Represents any JSON-RPC message that can be sent or received.
LoggingLevel
Logging levels supported by the MCP protocol
NumberOrString
A flexible identifier type that can be either a number or a string.
PromptMessageContent
Content types that can be included in prompt messages
PromptMessageRole
Represents the role of a message sender in a prompt conversation
RawContent
Reference
ResourceContents
Role
Represents the role of a participant in a conversation or message exchange.
ServerNotification
ServerRequest
ServerResult

Traits§

AnnotateAble
ConstString
GetExtensions
GetMeta
IntoContents
Types that can be converted into a list of contents

Functions§

object
unwrap the JsonObject under serde_json::Value

Type Aliases§

AudioContent
CallToolRequest
Request to call a specific tool
CancelledNotification
Cancellation
ClientInfo
ClientJsonRpcMessage
CompleteRequest
Content
CreateMessageRequest
Cursor
EmbeddedResource
EmptyResult
Empty result
ExperimentalCapabilities
GetPromptRequest
Request to get a specific prompt
ImageContent
InitializeRequest
Initialization
InitializedNotification
This notification is sent from the client to the server after initialization has finished.
JsonObject
A JSON object type alias for convenient handling of JSON data.
ListPromptsRequest
Request to list all available prompts from a server
ListResourceTemplatesRequest
Request to list all available resource templates from a server
ListResourcesRequest
Request to list all available resources from a server
ListRootsRequest
ListToolsRequest
Request to list all available tools from a server
LoggingMessageNotification
Notification containing a log message
PingRequest
ProgressNotification
PromptListChangedNotification
Notification sent when the list of available prompts changes
ReadResourceRequest
Request to read a specific resource
RequestId
Type alias for request identifiers used in JSON-RPC communication.
Resource
ResourceListChangedNotification
Notification sent when the list of available resources changes
ResourceTemplate
ResourceUpdatedNotification
Notification sent when a subscribed resource is updated
RootsListChangedNotification
ServerInfo
ServerJsonRpcMessage
SetLevelRequest
Request to set the logging level
SubscribeRequest
Request to subscribe to resource updates
TextContent
ToolListChangedNotification
Notification sent when the list of available tools changes
UnsubscribeRequest
Request to unsubscribe from resource updates