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 - 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 - Result returned in lieu of a standard result to indicate the request will
be processed asynchronously (spec
CreateTaskResult,resultType: "task"). - 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.
- Detailed
Task - A task with its status-specific payload inlined (spec
DetailedTask). - Discover
Request Method - Discover
Request Params - Parameters for
DiscoverRequest. - Discover
Result - The server’s response to a
DiscoverRequest. - 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
Create Request Method - Elicitation
Response Notification Method - Elicitation
Schema - Type-safe elicitation schema for requesting structured user input.
- Elicitation
Schema Builder - Fluent builder for constructing elicitation schemas.
- 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
Result - Response to a
tasks/getrequest (specGetTaskResult = Result & DetailedTask). - 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 - Input
Required Result - A result indicating that additional input is needed before the request can be completed.
- 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
Tools Request Method - List
Tools Result - Logging
Message Notification Method - Logging
Message Notification Param Deprecated - Parameters for a logging message notification
- Meta
Object - General-purpose
_metamap (specMetaObject). - 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
Meta Object - The
_metamap carried by notifications (specNotificationMetaObject). - 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
- Request
- Represents a JSON-RPC request with method, parameters, and extensions.
- Request
Meta Object - The
_metamap carried by requests (specRequestMetaObject). - 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 - Result
Type - Indicates the type of a result object, allowing the client to determine how to parse the response.
- 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.
- Server
Capabilities - Builder
- Server
Capabilities Builder - Server
Capabilities Builder State - Server
Peer Info - Information negotiated about a server peer.
- 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
- Subscription
Filter - Notification categories a client opts in to on a
subscriptions/listenstream. - Subscription
Filter Builder - Builder for
SubscriptionFilter. - Subscriptions
Acknowledged Notification Method - Subscriptions
Acknowledged Notification Params - Parameters reporting the accepted subset of a subscription filter.
- Subscriptions
Listen Request Method - Subscriptions
Listen Request Params - Parameters for opening a long-lived notification subscription.
- Subscriptions
Listen Result - Final response indicating that a subscription ended gracefully.
- Subscriptions
Listen Result Meta - Metadata on the final result of a
subscriptions/listenrequest. - Task
- Operational metadata about ongoing work (spec
Task, SEP-2663). - Task
AckResult - Empty acknowledgement for
tasks/updateandtasks/cancel(SEP-2663). - Task
Status Notification Method - Task
Status Notification Params - Parameters for a task status notification (spec
TaskStatusNotificationParams). - 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
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 - 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
- Update
Task Method - Update
Task Params - Parameters for
tasks/update(SEP-2663): deliver responses to outstanding in-task server-to-client requests surfaced viatasks/getinputRequests. - UrlElicitation
Capability - Capability for URL mode elicitation.
Enums§
- Cache
Scope - Scope describing who may cache cacheable list/read results (SEP-2549).
- Call
Tool Response - Result of a
tools/callrequest, including the MRTR intermediate result. - 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.
- GetPrompt
Response - Result of a
prompts/getrequest, including the MRTR intermediate result. - Icon
Theme - Icon themes supported by the MCP specification
- Input
Request - A server-initiated request that can appear inside
InputRequests. - 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.
- Read
Resource Response - Result of a
resources/readrequest, including the MRTR intermediate result. - 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
Payload - Status-specific payload carried alongside the base
Taskfields in aDetailedTask. - Task
Status - Canonical task lifecycle status (SEP-2663).
- Tool
Choice Mode - Tool selection mode (SEP-1577).
Constants§
- DEFAULT_
MRTR_ MAX_ ROUNDS - Default maximum number of MRTR rounds a high-level client call will drive.
- TASKS_
EXTENSION_ ID - Extension identifier for the MCP Tasks extension (SEP-2663).
Traits§
- Const
String - GetExtensions
- GetMeta
- Access to the metadata carried by a message envelope’s
Extensions. - Into
Contents - Types that can be converted into a list of content blocks.
- Request
Params Meta - Trait for request params that contain the
_metafield.
Functions§
- object
- unwrap the JsonObject under
serde_json::Value
Type Aliases§
- Call
Tool Request - Request to call a specific tool
- Cancel
Task Request - Cancelled
Notification - Cancellation
- Client
Config - A client’s own configuration: the protocol version, capabilities, and implementation identity it advertises to servers.
- Client
Info Deprecated - Deprecated alias for
ClientConfig. - Client
Json RpcMessage - Complete
Request - Create
Message Request Deprecated - Cursor
- Discover
Request - A request for the server’s supported protocol versions and capabilities.
- Elicit
Request - Request type for creating an elicitation to gather user input
- Empty
Result - Empty result
- Experimental
Capabilities - Extension
Capabilities - MCP extension capabilities map.
- GetPrompt
Request - Request to get a specific prompt
- GetTask
Request - Initialize
Request - Initialization
- Initialized
Notification - This notification is sent from the client to the server after initialization has finished.
- Input
Requests - A map of server-initiated requests that the client must fulfill.
- Input
Responses - A map of client responses to server-initiated requests.
- 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
Tools Request - Request to list all available tools from a server
- Logging
Message Notification Deprecated - Notification containing a log message
- 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
- 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
Updated Notification - Notification sent when a subscribed resource is updated
- Roots
List Changed Notification - Server
Config - A server’s own configuration: the protocol version, capabilities, implementation identity, and instructions it advertises to clients.
- Server
Info Deprecated - Deprecated alias for
ServerConfig. - Server
Json RpcMessage - SetLevel
Request Deprecated - Request to set the logging level
- Subscribe
Request Deprecated - Request to subscribe to resource updates
- Subscriptions
Acknowledged Notification - First notification sent on an established subscription stream.
- Subscriptions
Listen Request - Request that opens a long-lived notification subscription.
- Task
Status Notification - Tool
List Changed Notification - Notification sent when the list of available tools changes
- Unsubscribe
Request Deprecated - Request to unsubscribe from resource updates
- Update
Task Request