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.
- Argument
Info - Array
Type Const - Audio
Content - Audio content with base64-encoded data (spec
AudioContent). - 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
Message Request Method - Create
Message Request Params Deprecated - Parameters for creating a message through LLM sampling.
- Create
Message Result Deprecated - 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.
- Elicit
Result - The result returned by a client in response to an elicitation request.
- 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 - Embedded
Resource - Embedded resource content (spec
EmbeddedResource). - 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
Method - GetTask
Params - GetTask
Payload Method - GetTask
Payload Params - GetTask
Payload Result - Response to a
tasks/resultrequest. - GetTask
Result - Response to a
tasks/getrequest. - Icon
- A URL pointing to an icon resource or a base64-encoded data URI.
- Image
Content - Image content with base64-encoded data (spec
ImageContent). - 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 Deprecated - List
Tasks Method - List
Tasks Result - List
Tools Request Method - List
Tools Result - Logging
Message Notification Method - Logging
Message Notification Param Deprecated - Parameters for a logging message notification
- Meta
- Model
Hint Deprecated - A hint suggesting a preferred model name or family.
- Model
Preferences Deprecated - 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 or prompt template that the server offers (spec
Prompt). - Prompt
Argument - Describes an argument that a prompt can accept (spec
PromptArgument). - Prompt
List Changed Notification Method - Prompt
Message - A message returned as part of a prompt (spec
PromptMessage). - Prompt
Reference - Prompts
Capability - Protocol
Version - Represents the MCP protocol version used for communication.
- 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
- Related
Task Metadata - Metadata for associating messages with a task (spec
RelatedTaskMetadata). - Request
- Represents a JSON-RPC request with method, parameters, and extensions.
- Request
NoParam - Request
Optional Param - Resource
- A known resource that the server is capable of reading (spec
Resource). - Resource
List Changed Notification Method - Resource
Template - A template description for resources available on the server (spec
ResourceTemplate). - Resource
Template Reference - Resource
Updated Notification Method - Resource
Updated Notification Param - Parameters for a resource update notification
- Resources
Capability - Root
Deprecated - Roots
Capabilities - Roots capability. Deprecated by SEP-2577; remains functional and will be removed in a future release. See https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2577.
- Roots
List Changed Notification Method - Sampling
Capability - Sampling capability with optional sub-capabilities (SEP-1577).
- Sampling
Message Deprecated - A message in a sampling conversation, containing a role and content.
- Sampling
Task Capability - 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.
- Server
Capabilities - Builder
- Server
Capabilities Builder - Server
Capabilities Builder State - SetLevel
Request Method - SetLevel
Request Params Deprecated - 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
Metadata - Metadata for augmenting a request with task execution (spec
TaskMetadata). - Task
Requests Capability - Request types that support task-augmented execution.
- Task
Status Notification Method - Task
Status Notification Param - Parameters for a task status notification (spec
TaskStatusNotificationParams). - Tasks
Capability - Task capabilities shared by client and server.
- Text
Content - Text content block (spec
TextContent). - 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 Deprecated - Tool choice configuration (SEP-1577).
- Tool
Execution - Execution-related configuration for a tool.
- Tool
List Changed Notification Method - Tool
Result Content Deprecated - Tool execution result in user message (SEP-1577).
- Tool
UseContent Deprecated - 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 - Content
Block - Unified content block union (spec
ContentBlock). - Context
Inclusion - Specifies how much context should be included in sampling requests.
- Elicit
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.
- Icon
Theme - Icon themes supported by the MCP specification
- Json
RpcMessage - Represents any JSON-RPC message that can be sent or received.
- Logging
Level Deprecated - 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 Definition - Primitive schema definition for elicitation properties.
- Reference
- Resource
Contents - The contents of a specific resource or sub-resource.
- 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 Block Deprecated - 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§
- Const
String - GetExtensions
- GetMeta
- Into
Contents - Types that can be converted into a list of content blocks.
- 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§
- 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). - Create
Elicitation Request Deprecated - Create
Elicitation Request Param Deprecated - Deprecated: Use
ElicitRequestParamsinstead (SEP-1319 compliance). - Create
Elicitation Request Params Deprecated - Create
Elicitation Result Deprecated - Create
Message Request Deprecated - Create
Message Request Param Deprecated - Deprecated: Use
CreateMessageRequestParamsinstead (SEP-1319 compliance). - Cursor
- Elicit
Request - Request type for creating an elicitation to gather user input
- Elicitation
Complete Notification - Notification sent when an url elicitation process is completed.
- Elicitation
Completion Notification Deprecated - 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 Method Deprecated - GetTask
Info Param Deprecated - GetTask
Info Params Deprecated - GetTask
Info Request Deprecated - GetTask
Info Result Deprecated - Deprecated: Use
GetTaskResultinstead (spec alignment). - GetTask
Payload Request - GetTask
Request - GetTask
Result Method Deprecated - GetTask
Result Param Deprecated - GetTask
Result Params Deprecated - GetTask
Result Request Deprecated - 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 Deprecated - List
Tasks Request - List
Tools Request - Request to list all available tools from a server
- Logging
Message Notification Deprecated - Notification containing a log message
- Paginated
Request Param Deprecated - Deprecated: Use
PaginatedRequestParamsinstead (SEP-1319 compliance). - Ping
Request - Primitive
Schema Deprecated - 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
List Changed Notification - Notification sent when the list of available resources changes
- Resource
Reference Deprecated - Resource
Updated Notification - Notification sent when a subscribed resource is updated
- Roots
List Changed Notification - Sampling
Message Content Deprecated - Server
Info - Server
Json RpcMessage - SetLevel
Request Deprecated - 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). - Task
Status Notification - 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).