Skip to main content

Module model

Module model 

Source
Expand description

Basic data types in MCP specification

Structs§

Annotations
Optional annotations for the client. The client can use annotations to inform how objects are used or displayed.
ArgumentInfo
ArrayTypeConst
AudioContent
Audio content with base64-encoded data (spec AudioContent).
BooleanSchema
Schema definition for boolean properties.
BooleanTypeConst
CallToolRequestMethod
CallToolRequestParams
Parameters for calling a tool provided by an MCP server.
CallToolResult
The result of a tool call operation.
CancelTaskMethod
CancelTaskParams
CancelTaskResult
Response to a tasks/cancel request.
CancelledNotificationMethod
CancelledNotificationParam
ClientCapabilities
Builder
ClientCapabilitiesBuilder
ClientCapabilitiesBuilderState
CompleteRequestMethod
CompleteRequestParams
CompleteResult
CompletionContext
Context for completion requests providing previously resolved arguments.
CompletionInfo
ConstTitle
Schema definition for enum properties.
CreateMessageRequestMethod
CreateMessageRequestParamsDeprecated
Parameters for creating a message through LLM sampling.
CreateMessageResultDeprecated
Result of sampling/createMessage (SEP-1577). The result of a sampling/createMessage request containing the generated response.
CreateTaskResult
Wrapper returned by task-augmented requests (CreateTaskResult in SEP-1686).
CustomNotification
A catch-all notification either side can use to send custom messages to its peer.
CustomRequest
A catch-all request either side can use to send custom messages to its peer.
CustomResult
A catch-all response either side can use for custom requests.
ElicitResult
The result returned by a client in response to an elicitation request.
ElicitationCapability
Elicitation allows servers to request interactive input from users during tool execution. This capability indicates that a client can handle elicitation requests and present appropriate UI to users for collecting the requested information.
ElicitationCompletionNotificationMethod
ElicitationCreateRequestMethod
ElicitationResponseNotificationMethod
ElicitationResponseNotificationParam
Notification parameters for an url elicitation completion notification.
ElicitationSchema
Type-safe elicitation schema for requesting structured user input.
ElicitationSchemaBuilder
Fluent builder for constructing elicitation schemas.
ElicitationTaskCapability
EmbeddedResource
Embedded resource content (spec EmbeddedResource).
EmptyObject
This is commonly used for representing empty objects in MCP messages.
EnumSchemaBuilder
Builder for EnumSchema Allows to create various enum schema types (single/multi select, titled/untitled) with validation of provided parameters
EnumTypeConst
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.
FormElicitationCapability
Capability for handling elicitation requests from servers. Elicitation allows servers to request interactive input from users during tool execution. This capability indicates that a client can handle elicitation requests and present appropriate UI to users for collecting the requested information.
GetPromptRequestMethod
GetPromptRequestParams
Parameters for retrieving a specific prompt
GetPromptResult
GetTaskMethod
GetTaskParams
GetTaskPayloadMethod
GetTaskPayloadParams
GetTaskPayloadResult
Response to a tasks/result request.
GetTaskResult
Response to a tasks/get request.
Icon
A URL pointing to an icon resource or a base64-encoded data URI.
ImageContent
Image content with base64-encoded data (spec ImageContent).
Implementation
InitializeRequestParams
Parameters sent by a client when initializing a connection to an MCP server.
InitializeResult
The server’s response to an initialization request.
InitializeResultMethod
InitializedNotificationMethod
IntegerSchema
Schema definition for integer properties.
IntegerTypeConst
JsonContent
JsonRpcError
JsonRpcNotification
JsonRpcRequest
JsonRpcResponse
JsonRpcVersion2_0
LegacyEnumSchema
Legacy enum schema, keep for backward compatibility
ListPromptsRequestMethod
ListPromptsResult
ListResourceTemplatesRequestMethod
ListResourceTemplatesResult
ListResourcesRequestMethod
ListResourcesResult
ListRootsRequestMethod
ListRootsResultDeprecated
ListTasksMethod
ListTasksResult
ListToolsRequestMethod
ListToolsResult
LoggingMessageNotificationMethod
LoggingMessageNotificationParamDeprecated
Parameters for a logging message notification
Meta
ModelHintDeprecated
A hint suggesting a preferred model name or family.
ModelPreferencesDeprecated
Preferences for model selection and behavior in sampling requests.
MultiSelect
Marker type for multi-select enum builder
Notification
NotificationNoParam
NumberSchema
Schema definition for number properties (floating-point).
NumberTypeConst
ObjectTypeConst
PaginatedRequestParams
PingRequestMethod
ProgressNotificationMethod
ProgressNotificationParam
ProgressToken
A token used to track the progress of long-running operations.
Prompt
A prompt or prompt template that the server offers (spec Prompt).
PromptArgument
Describes an argument that a prompt can accept (spec PromptArgument).
PromptListChangedNotificationMethod
PromptMessage
A message returned as part of a prompt (spec PromptMessage).
PromptReference
PromptsCapability
ProtocolVersion
Represents the MCP protocol version used for communication.
ReadResourceRequestMethod
ReadResourceRequestParams
Parameters for reading a specific resource
ReadResourceResult
Result containing the contents of a read resource
RelatedTaskMetadata
Metadata for associating messages with a task (spec RelatedTaskMetadata).
Request
Represents a JSON-RPC request with method, parameters, and extensions.
RequestNoParam
RequestOptionalParam
Resource
A known resource that the server is capable of reading (spec Resource).
ResourceListChangedNotificationMethod
ResourceTemplate
A template description for resources available on the server (spec ResourceTemplate).
ResourceTemplateReference
ResourceUpdatedNotificationMethod
ResourceUpdatedNotificationParam
Parameters for a resource update notification
ResourcesCapability
RootDeprecated
RootsCapabilities
Roots capability. Deprecated by SEP-2577; remains functional and will be removed in a future release. See https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2577.
RootsListChangedNotificationMethod
SamplingCapability
Sampling capability with optional sub-capabilities (SEP-1577).
SamplingMessageDeprecated
A message in a sampling conversation, containing a role and content.
SamplingTaskCapability
Sampling task capability. Deprecated by SEP-2577; remains functional and will be removed in a future release. See https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2577.
ServerCapabilities
Builder
ServerCapabilitiesBuilder
ServerCapabilitiesBuilderState
SetLevelRequestMethod
SetLevelRequestParamsDeprecated
Parameters for setting the logging level
SingleSelect
Marker type for single-select enum builder
StringSchema
Schema definition for string properties.
StringTypeConst
SubscribeRequestMethod
SubscribeRequestParams
Parameters for subscribing to resource updates
Task
Primary Task object that surfaces metadata during the task lifecycle.
TaskMetadata
Metadata for augmenting a request with task execution (spec TaskMetadata).
TaskRequestsCapability
Request types that support task-augmented execution.
TaskStatusNotificationMethod
TaskStatusNotificationParam
Parameters for a task status notification (spec TaskStatusNotificationParams).
TasksCapability
Task capabilities shared by client and server.
TextContent
Text content block (spec TextContent).
TitledItems
Items for titled multi-select options
TitledMultiSelectEnumSchema
Multi-select titled options
TitledSingleSelectEnumSchema
Titled single-select
Tool
A tool that can be used by a model.
ToolAnnotations
Additional properties describing a Tool to clients.
ToolChoiceDeprecated
Tool choice configuration (SEP-1577).
ToolExecution
Execution-related configuration for a tool.
ToolListChangedNotificationMethod
ToolResultContentDeprecated
Tool execution result in user message (SEP-1577).
ToolUseContentDeprecated
Tool call request from assistant (SEP-1577).
ToolsCapability
ToolsTaskCapability
UnsubscribeRequestMethod
UnsubscribeRequestParams
Parameters for unsubscribing from resource updates
UntitledItems
Items for untitled multi-select options
UntitledMultiSelectEnumSchema
Multi-select untitled options
UntitledSingleSelectEnumSchema
Untitled single-select
UrlElicitationCapability
Capability for URL mode elicitation.

Enums§

ClientNotification
ClientRequest
ClientResult
ContentBlock
Unified content block union (spec ContentBlock).
ContextInclusion
Specifies how much context should be included in sampling requests.
ElicitRequestParams
Parameters for creating an elicitation request to gather user input.
ElicitationAction
Represents the possible actions a user can take in response to an elicitation request.
EnumSchema
Compliant with MCP 2025-06-18 specification for elicitation schemas. Enums must have string type for values and can optionally include human-readable names.
IconTheme
Icon themes supported by the MCP specification
JsonRpcMessage
Represents any JSON-RPC message that can be sent or received.
LoggingLevelDeprecated
Logging levels supported by the MCP protocol
MultiSelectEnumSchema
Multi-select enum options
NumberOrString
A flexible identifier type that can be either a number or a string.
PrimitiveSchemaDefinition
Primitive schema definition for elicitation properties.
Reference
ResourceContents
The contents of a specific resource or sub-resource.
Role
Represents the role of a participant in a conversation or message exchange.
SamplingContent
Single or array content wrapper (SEP-1577).
SamplingMessageContentBlockDeprecated
Content types for sampling messages (SEP-1577).
ServerNotification
ServerRequest
ServerResult
SingleSelectEnumSchema
Combined single-select
StringFormat
String format types allowed by the MCP specification.
TaskStatus
Canonical task lifecycle status as defined by SEP-1686.
TaskSupport
Per-tool task support mode as defined in the MCP specification.
ToolChoiceMode
Tool selection mode (SEP-1577).

Traits§

ConstString
GetExtensions
GetMeta
IntoContents
Types that can be converted into a list of content blocks.
RequestParamsMeta
Trait for request params that contain the _meta field.
TaskAugmentedRequestParamsMeta
Trait for task-augmented request params that contain both _meta and task fields.

Functions§

object
unwrap the JsonObject under serde_json::Value

Type Aliases§

CallToolRequest
Request to call a specific tool
CallToolRequestParamDeprecated
Deprecated: Use CallToolRequestParams instead (SEP-1319 compliance).
CancelTaskParamDeprecated
Deprecated: Use CancelTaskParams instead (SEP-1319 compliance).
CancelTaskRequest
CancelledNotification
Cancellation
ClientInfo
ClientJsonRpcMessage
CompleteRequest
CompleteRequestParamDeprecated
Deprecated: Use CompleteRequestParams instead (SEP-1319 compliance).
CreateElicitationRequestDeprecated
CreateElicitationRequestParamDeprecated
Deprecated: Use ElicitRequestParams instead (SEP-1319 compliance).
CreateElicitationRequestParamsDeprecated
CreateElicitationResultDeprecated
CreateMessageRequestDeprecated
CreateMessageRequestParamDeprecated
Deprecated: Use CreateMessageRequestParams instead (SEP-1319 compliance).
Cursor
ElicitRequest
Request type for creating an elicitation to gather user input
ElicitationCompleteNotification
Notification sent when an url elicitation process is completed.
ElicitationCompletionNotificationDeprecated
EmptyResult
Empty result
ExperimentalCapabilities
ExtensionCapabilities
MCP extension capabilities map.
GetPromptRequest
Request to get a specific prompt
GetPromptRequestParamDeprecated
Deprecated: Use GetPromptRequestParams instead (SEP-1319 compliance).
GetTaskInfoMethodDeprecated
GetTaskInfoParamDeprecated
GetTaskInfoParamsDeprecated
GetTaskInfoRequestDeprecated
GetTaskInfoResultDeprecated
Deprecated: Use GetTaskResult instead (spec alignment).
GetTaskPayloadRequest
GetTaskRequest
GetTaskResultMethodDeprecated
GetTaskResultParamDeprecated
GetTaskResultParamsDeprecated
GetTaskResultRequestDeprecated
InitializeRequest
Initialization
InitializeRequestParamDeprecated
Deprecated: Use InitializeRequestParams instead (SEP-1319 compliance).
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
ListRootsRequestDeprecated
ListTasksRequest
ListToolsRequest
Request to list all available tools from a server
LoggingMessageNotificationDeprecated
Notification containing a log message
PaginatedRequestParamDeprecated
Deprecated: Use PaginatedRequestParams instead (SEP-1319 compliance).
PingRequest
PrimitiveSchemaDeprecated
ProgressNotification
PromptListChangedNotification
Notification sent when the list of available prompts changes
ReadResourceRequest
Request to read a specific resource
ReadResourceRequestParamDeprecated
Deprecated: Use ReadResourceRequestParams instead (SEP-1319 compliance).
RequestId
Type alias for request identifiers used in JSON-RPC communication.
ResourceListChangedNotification
Notification sent when the list of available resources changes
ResourceReferenceDeprecated
ResourceUpdatedNotification
Notification sent when a subscribed resource is updated
RootsListChangedNotification
SamplingMessageContentDeprecated
ServerInfo
ServerJsonRpcMessage
SetLevelRequestDeprecated
Request to set the logging level
SetLevelRequestParamDeprecated
Deprecated: Use SetLevelRequestParams instead (SEP-1319 compliance).
SubscribeRequest
Request to subscribe to resource updates
SubscribeRequestParamDeprecated
Deprecated: Use SubscribeRequestParams instead (SEP-1319 compliance).
TaskStatusNotification
ToolListChangedNotification
Notification sent when the list of available tools changes
UnsubscribeRequest
Request to unsubscribe from resource updates
UnsubscribeRequestParamDeprecated
Deprecated: Use UnsubscribeRequestParams instead (SEP-1319 compliance).