Expand description
Basic data types in MCP specification
Structs§
- Annotated
- Annotations
- Argument
Info - Call
Tool Request Method - Call
Tool Request Param - Parameters for calling a tool provided by an MCP server.
- Call
Tool Result - The result of a tool call operation.
- Cancelled
Notification Method - Cancelled
Notification Param - Client
Capabilities - Builder
- Client
Capabilities Builder - Client
Capabilities Builder State - Complete
Request Method - Complete
Request Param - Complete
Result - Completion
Info - Create
Message Request Method - Create
Message Request Param - Parameters for creating a message through LLM sampling.
- Create
Message Result - The result of a sampling/createMessage request containing the generated response.
- Empty
Object - This is commonly used for representing empty objects in MCP messages.
- 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.
- GetPrompt
Request Method - GetPrompt
Request Param - Parameters for retrieving a specific prompt
- GetPrompt
Result - Implementation
- Initialize
Request Param - 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 - Json
Content - Json
RpcError - Json
RpcNotification - Json
RpcRequest - Json
RpcResponse - Json
RpcVersion2_ 0 - 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
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.
- Notification
- Notification
NoParam - Paginated
Request Param - 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
Argument Template - A template for a prompt argument, this should be identical to PromptArgument
- Prompt
List Changed Notification Method - Prompt
Message - A message in a prompt conversation
- Prompt
Reference - Prompt
Template - A template for a prompt
- 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 Param - 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
Message - A message in a sampling conversation, containing a role and content.
- Server
Capabilities - Builder
- Server
Capabilities Builder - Server
Capabilities Builder State - SetLevel
Request Method - SetLevel
Request Param - Parameters for setting the logging level
- Subscribe
Request Method - Subscribe
Request Param - Parameters for subscribing to resource updates
- Tool
- A tool that can be used by a model.
- Tool
Annotations - Additional properties describing a Tool to clients.
- Tool
List Changed Notification Method - Tools
Capability - Unsubscribe
Request Method - Unsubscribe
Request Param - Parameters for unsubscribing from resource updates
Enums§
- Client
Notification - Client
Request - Client
Result - Context
Inclusion - Specifies how much context should be included in sampling requests.
- Json
RpcBatch Request Item - Json
RpcBatch Response Item - Json
RpcMessage - Represents any JSON-RPC message that can be sent or received.
- Logging
Level - Logging levels supported by the MCP protocol
- Number
OrString - A flexible identifier type that can be either a number or a string.
- 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.
- Server
Notification - Server
Request - Server
Result
Traits§
- Annotate
Able - Const
String - GetExtensions
- GetMeta
- Into
Contents - Types that can be converted into a list of contents
Functions§
- object
- unwrap the JsonObject under
serde_json::Value
Type Aliases§
- Audio
Content - Call
Tool Request - Request to call a specific tool
- Cancelled
Notification - Cancellation
- Client
Info - Client
Json RpcMessage - Complete
Request - Content
- Create
Message Request - Cursor
- Embedded
Resource - Empty
Result - Empty result
- Experimental
Capabilities - GetPrompt
Request - Request to get a specific prompt
- Image
Content - Initialize
Request - Initialization
- 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
Tools Request - Request to list all available tools from a server
- Logging
Message Notification - 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
- 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
- Subscribe
Request - Request to subscribe to resource updates
- Text
Content - Tool
List Changed Notification - Notification sent when the list of available tools changes
- Unsubscribe
Request - Request to unsubscribe from resource updates