Skip to main content

Module model

Module model 

Source
Expand description

Basic data types in MCP specification

Structs§

Annotated
Annotations
ArgumentInfo
ArrayTypeConst
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.
CreateElicitationResult
The result returned by a client in response to an elicitation request.
CreateMessageRequestMethod
CreateMessageRequestParams
Parameters for creating a message through LLM sampling.
CreateMessageResult
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.
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
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
GetTaskInfoMethod
GetTaskInfoParams
GetTaskPayloadResult
Response to a tasks/result request.
GetTaskResult
Response to a tasks/get request.
GetTaskResultMethod
GetTaskResultParams
Icon
A URL pointing to an icon resource or a base64-encoded data URI.
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
ListRootsResult
ListTasksMethod
ListTasksResult
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.
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 that can be used to generate text from a model
PromptArgument
Represents a prompt argument that can be passed to customize the prompt
PromptListChangedNotificationMethod
PromptMessage
A message in a prompt conversation
PromptReference
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
ReadResourceRequestParams
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
SamplingCapability
Sampling capability with optional sub-capabilities (SEP-1577).
SamplingMessage
A message in a sampling conversation, containing a role and content.
SamplingTaskCapability
ServerCapabilities
Builder
ServerCapabilitiesBuilder
ServerCapabilitiesBuilderState
SetLevelRequestMethod
SetLevelRequestParams
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.
TaskList
Paginated list of tasks
TaskRequestsCapability
Request types that support task-augmented execution.
TasksCapability
Task capabilities shared by client and server.
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.
ToolChoice
Tool choice configuration (SEP-1577).
ToolExecution
Execution-related configuration for a tool.
ToolListChangedNotificationMethod
ToolResultContent
Tool execution result in user message (SEP-1577).
ToolUseContent
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
ContextInclusion
Specifies how much context should be included in sampling requests.
CreateElicitationRequestParams
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.
JsonRpcMessage
Represents any JSON-RPC message that can be sent or received.
LoggingLevel
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.
PrimitiveSchema
Primitive schema definition for elicitation properties.
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.
SamplingContent
Single or array content wrapper (SEP-1577).
SamplingMessageContent
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§

AnnotateAble
ConstString
GetExtensions
GetMeta
IntoContents
Types that can be converted into a list of contents
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§

AudioContent
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).
Content
CreateElicitationRequest
Request type for creating an elicitation to gather user input
CreateElicitationRequestParamDeprecated
Deprecated: Use CreateElicitationRequestParams instead (SEP-1319 compliance).
CreateMessageRequest
CreateMessageRequestParamDeprecated
Deprecated: Use CreateMessageRequestParams instead (SEP-1319 compliance).
Cursor
ElicitationCompletionNotification
Notification sent when an url elicitation process is completed.
EmbeddedResource
EmptyResult
Empty result
ExperimentalCapabilities
ExtensionCapabilities
MCP extension capabilities map.
GetPromptRequest
Request to get a specific prompt
GetPromptRequestParamDeprecated
Deprecated: Use GetPromptRequestParams instead (SEP-1319 compliance).
GetTaskInfoParamDeprecated
Deprecated: Use GetTaskInfoParams instead (SEP-1319 compliance).
GetTaskInfoRequest
GetTaskInfoResultDeprecated
Deprecated: Use GetTaskResult instead (spec alignment).
GetTaskResultParamDeprecated
Deprecated: Use GetTaskResultParams instead (SEP-1319 compliance).
GetTaskResultRequest
ImageContent
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
ListRootsRequest
ListTasksRequest
ListToolsRequest
Request to list all available tools from a server
LoggingMessageNotification
Notification containing a log message
PaginatedRequestParamDeprecated
Deprecated: Use PaginatedRequestParams instead (SEP-1319 compliance).
PingRequest
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.
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
SetLevelRequestParamDeprecated
Deprecated: Use SetLevelRequestParams instead (SEP-1319 compliance).
SubscribeRequest
Request to subscribe to resource updates
SubscribeRequestParamDeprecated
Deprecated: Use SubscribeRequestParams instead (SEP-1319 compliance).
TextContent
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).