Expand description
Basic data types in MCP specification
Structs§
- Annotated
- Annotations
- Argument
Info - Array
Type Const - Boolean
Schema - Schema definition for boolean properties.
- Boolean
Type Const - Call
Tool Request Method - Call
Tool Request Params - Parameters for calling a tool provided by an MCP server.
- Call
Tool Result - The result of a tool call operation.
- Cancel
Task Method - Cancel
Task Params - Cancel
Task Result - Response to a
tasks/cancelrequest. - Cancelled
Notification Method - Cancelled
Notification Param - Client
Capabilities - Builder
- Client
Capabilities Builder - Client
Capabilities Builder State - Complete
Request Method - Complete
Request Params - Complete
Result - Completion
Context - Context for completion requests providing previously resolved arguments.
- Completion
Info - Const
Title - Schema definition for enum properties.
- Create
Elicitation Result - The result returned by a client in response to an elicitation request.
- Create
Message Request Method - Create
Message Request Params - Parameters for creating a message through LLM sampling.
- Create
Message Result - Result of sampling/createMessage (SEP-1577). The result of a sampling/createMessage request containing the generated response.
- Create
Task Result - Wrapper returned by task-augmented requests (CreateTaskResult in SEP-1686).
- Custom
Notification - A catch-all notification either side can use to send custom messages to its peer.
- Custom
Request - A catch-all request either side can use to send custom messages to its peer.
- Custom
Result - A catch-all response either side can use for custom requests.
- Elicitation
Capability - 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.
- Elicitation
Completion Notification Method - Elicitation
Create Request Method - Elicitation
Response Notification Method - Elicitation
Response Notification Param - Notification parameters for an url elicitation completion notification.
- Elicitation
Schema - Type-safe elicitation schema for requesting structured user input.
- Elicitation
Schema Builder - Fluent builder for constructing elicitation schemas.
- Elicitation
Task Capability - Empty
Object - This is commonly used for representing empty objects in MCP messages.
- Enum
Schema Builder - Builder for EnumSchema Allows to create various enum schema types (single/multi select, titled/untitled) with validation of provided parameters
- Enum
Type Const - Error
Code - Standard JSON-RPC error codes used throughout the MCP protocol.
- Error
Data - Error information for JSON-RPC error responses.
- Extensions
- A type map of protocol extensions.
- Form
Elicitation Capability - 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.
- GetPrompt
Request Method - GetPrompt
Request Params - Parameters for retrieving a specific prompt
- GetPrompt
Result - GetTask
Info Method - GetTask
Info Params - GetTask
Payload Result - Response to a
tasks/resultrequest. - GetTask
Result - Response to a
tasks/getrequest. - GetTask
Result Method - GetTask
Result Params - Icon
- A URL pointing to an icon resource or a base64-encoded data URI.
- Implementation
- Initialize
Request Params - Parameters sent by a client when initializing a connection to an MCP server.
- Initialize
Result - The server’s response to an initialization request.
- Initialize
Result Method - Initialized
Notification Method - Integer
Schema - Schema definition for integer properties.
- Integer
Type Const - Json
Content - Json
RpcError - Json
RpcNotification - Json
RpcRequest - Json
RpcResponse - Json
RpcVersion2_ 0 - Legacy
Enum Schema - Legacy enum schema, keep for backward compatibility
- List
Prompts Request Method - List
Prompts Result - List
Resource Templates Request Method - List
Resource Templates Result - List
Resources Request Method - List
Resources Result - List
Roots Request Method - List
Roots Result - List
Tasks Method - List
Tasks Result - List
Tools Request Method - List
Tools Result - Logging
Message Notification Method - Logging
Message Notification Param - Parameters for a logging message notification
- Meta
- Model
Hint - A hint suggesting a preferred model name or family.
- Model
Preferences - Preferences for model selection and behavior in sampling requests.
- Multi
Select - Marker type for multi-select enum builder
- Notification
- Notification
NoParam - Number
Schema - Schema definition for number properties (floating-point).
- Number
Type Const - Object
Type Const - Paginated
Request Params - Ping
Request Method - Progress
Notification Method - Progress
Notification Param - Progress
Token - A token used to track the progress of long-running operations.
- Prompt
- A prompt that can be used to generate text from a model
- Prompt
Argument - Represents a prompt argument that can be passed to customize the prompt
- Prompt
List Changed Notification Method - Prompt
Message - A message in a prompt conversation
- Prompt
Reference - Prompts
Capability - Protocol
Version - Represents the MCP protocol version used for communication.
- RawAudio
Content - RawEmbedded
Resource - RawImage
Content - RawResource
- Represents a resource in the extension with metadata
- RawResource
Template - RawText
Content - Read
Resource Request Method - Read
Resource Request Params - Parameters for reading a specific resource
- Read
Resource Result - Result containing the contents of a read resource
- Request
- Represents a JSON-RPC request with method, parameters, and extensions.
- Request
NoParam - Request
Optional Param - Resource
List Changed Notification Method - Resource
Reference - Resource
Updated Notification Method - Resource
Updated Notification Param - Parameters for a resource update notification
- Resources
Capability - Root
- Roots
Capabilities - Roots
List Changed Notification Method - Sampling
Capability - Sampling capability with optional sub-capabilities (SEP-1577).
- Sampling
Message - A message in a sampling conversation, containing a role and content.
- Sampling
Task Capability - Server
Capabilities - Builder
- Server
Capabilities Builder - Server
Capabilities Builder State - SetLevel
Request Method - SetLevel
Request Params - Parameters for setting the logging level
- Single
Select - Marker type for single-select enum builder
- String
Schema - Schema definition for string properties.
- String
Type Const - Subscribe
Request Method - Subscribe
Request Params - Parameters for subscribing to resource updates
- Task
- Primary Task object that surfaces metadata during the task lifecycle.
- Task
List - Paginated list of tasks
- Task
Requests Capability - Request types that support task-augmented execution.
- Tasks
Capability - Task capabilities shared by client and server.
- Titled
Items - Items for titled multi-select options
- Titled
Multi Select Enum Schema - Multi-select titled options
- Titled
Single Select Enum Schema - Titled single-select
- Tool
- A tool that can be used by a model.
- Tool
Annotations - Additional properties describing a Tool to clients.
- Tool
Choice - Tool choice configuration (SEP-1577).
- Tool
Execution - Execution-related configuration for a tool.
- Tool
List Changed Notification Method - Tool
Result Content - Tool execution result in user message (SEP-1577).
- Tool
UseContent - Tool call request from assistant (SEP-1577).
- Tools
Capability - Tools
Task Capability - Unsubscribe
Request Method - Unsubscribe
Request Params - Parameters for unsubscribing from resource updates
- Untitled
Items - Items for untitled multi-select options
- Untitled
Multi Select Enum Schema - Multi-select untitled options
- Untitled
Single Select Enum Schema - Untitled single-select
- UrlElicitation
Capability - Capability for URL mode elicitation.
Enums§
- Client
Notification - Client
Request - Client
Result - Context
Inclusion - Specifies how much context should be included in sampling requests.
- Create
Elicitation Request Params - Parameters for creating an elicitation request to gather user input.
- Elicitation
Action - Represents the possible actions a user can take in response to an elicitation request.
- Enum
Schema - Compliant with MCP 2025-06-18 specification for elicitation schemas. Enums must have string type for values and can optionally include human-readable names.
- Json
RpcMessage - Represents any JSON-RPC message that can be sent or received.
- Logging
Level - Logging levels supported by the MCP protocol
- Multi
Select Enum Schema - Multi-select enum options
- Number
OrString - A flexible identifier type that can be either a number or a string.
- Primitive
Schema - Primitive schema definition for elicitation properties.
- Prompt
Message Content - Content types that can be included in prompt messages
- Prompt
Message Role - Represents the role of a message sender in a prompt conversation
- RawContent
- Reference
- Resource
Contents - Role
- Represents the role of a participant in a conversation or message exchange.
- Sampling
Content - Single or array content wrapper (SEP-1577).
- Sampling
Message Content - Content types for sampling messages (SEP-1577).
- Server
Notification - Server
Request - Server
Result - Single
Select Enum Schema - Combined single-select
- String
Format - String format types allowed by the MCP specification.
- Task
Status - Canonical task lifecycle status as defined by SEP-1686.
- Task
Support - Per-tool task support mode as defined in the MCP specification.
- Tool
Choice Mode - Tool selection mode (SEP-1577).
Traits§
- Annotate
Able - Const
String - GetExtensions
- GetMeta
- Into
Contents - Types that can be converted into a list of contents
- Request
Params Meta - Trait for request params that contain the
_metafield. - Task
Augmented Request Params Meta - Trait for task-augmented request params that contain both
_metaandtaskfields.
Functions§
- object
- unwrap the JsonObject under
serde_json::Value
Type Aliases§
- Audio
Content - Call
Tool Request - Request to call a specific tool
- Call
Tool Request Param Deprecated - Deprecated: Use
CallToolRequestParamsinstead (SEP-1319 compliance). - Cancel
Task Param Deprecated - Deprecated: Use
CancelTaskParamsinstead (SEP-1319 compliance). - Cancel
Task Request - Cancelled
Notification - Cancellation
- Client
Info - Client
Json RpcMessage - Complete
Request - Complete
Request Param Deprecated - Deprecated: Use
CompleteRequestParamsinstead (SEP-1319 compliance). - Content
- Create
Elicitation Request - Request type for creating an elicitation to gather user input
- Create
Elicitation Request Param Deprecated - Deprecated: Use
CreateElicitationRequestParamsinstead (SEP-1319 compliance). - Create
Message Request - Create
Message Request Param Deprecated - Deprecated: Use
CreateMessageRequestParamsinstead (SEP-1319 compliance). - Cursor
- Elicitation
Completion Notification - Notification sent when an url elicitation process is completed.
- Embedded
Resource - Empty
Result - Empty result
- Experimental
Capabilities - Extension
Capabilities - MCP extension capabilities map.
- GetPrompt
Request - Request to get a specific prompt
- GetPrompt
Request Param Deprecated - Deprecated: Use
GetPromptRequestParamsinstead (SEP-1319 compliance). - GetTask
Info Param Deprecated - Deprecated: Use
GetTaskInfoParamsinstead (SEP-1319 compliance). - GetTask
Info Request - GetTask
Info Result Deprecated - Deprecated: Use
GetTaskResultinstead (spec alignment). - GetTask
Result Param Deprecated - Deprecated: Use
GetTaskResultParamsinstead (SEP-1319 compliance). - GetTask
Result Request - Image
Content - Initialize
Request - Initialization
- Initialize
Request Param Deprecated - Deprecated: Use
InitializeRequestParamsinstead (SEP-1319 compliance). - Initialized
Notification - This notification is sent from the client to the server after initialization has finished.
- Json
Object - A JSON object type alias for convenient handling of JSON data.
- List
Prompts Request - Request to list all available prompts from a server
- List
Resource Templates Request - Request to list all available resource templates from a server
- List
Resources Request - Request to list all available resources from a server
- List
Roots Request - List
Tasks Request - List
Tools Request - Request to list all available tools from a server
- Logging
Message Notification - Notification containing a log message
- Paginated
Request Param Deprecated - Deprecated: Use
PaginatedRequestParamsinstead (SEP-1319 compliance). - Ping
Request - Progress
Notification - Prompt
List Changed Notification - Notification sent when the list of available prompts changes
- Read
Resource Request - Request to read a specific resource
- Read
Resource Request Param Deprecated - Deprecated: Use
ReadResourceRequestParamsinstead (SEP-1319 compliance). - Request
Id - Type alias for request identifiers used in JSON-RPC communication.
- Resource
- Resource
List Changed Notification - Notification sent when the list of available resources changes
- Resource
Template - Resource
Updated Notification - Notification sent when a subscribed resource is updated
- Roots
List Changed Notification - Server
Info - Server
Json RpcMessage - SetLevel
Request - Request to set the logging level
- SetLevel
Request Param Deprecated - Deprecated: Use
SetLevelRequestParamsinstead (SEP-1319 compliance). - Subscribe
Request - Request to subscribe to resource updates
- Subscribe
Request Param Deprecated - Deprecated: Use
SubscribeRequestParamsinstead (SEP-1319 compliance). - Text
Content - Tool
List Changed Notification - Notification sent when the list of available tools changes
- Unsubscribe
Request - Request to unsubscribe from resource updates
- Unsubscribe
Request Param Deprecated - Deprecated: Use
UnsubscribeRequestParamsinstead (SEP-1319 compliance).