Expand description
MCP protocol message definitions
This module contains all the MCP-specific message types and their serialization/deserialization logic. These messages follow the JSON-RPC 2.0 specification and represent the various operations supported by the Model Context Protocol.
Modules§
- methods
- JSON-RPC method names for MCP messages
Structs§
- Call
Tool Params - Parameters for the tools/call request
- Call
Tool Result - Result of the tools/call request
- Create
Message Params - Parameters for the sampling/createMessage request
- Create
Message Result - Result of the sampling/createMessage request
- GetPrompt
Params - Parameters for the prompts/get request
- GetPrompt
Result - Result of the prompts/get request
- Initialize
Params - Parameters for the initialize request
- Initialize
Result - Result of the initialize request
- List
Prompts Params - Parameters for the prompts/list request
- List
Prompts Result - Result of the prompts/list request
- List
Resources Params - Parameters for the resources/list request
- List
Resources Result - Result of the resources/list request
- List
Tools Params - Parameters for the tools/list request
- List
Tools Result - Result of the tools/list request
- Logging
Message Params - Parameters for the logging/message notification
- Model
Preferences - Model preferences for sampling
- Ping
Params - Parameters for the ping request (no parameters)
- Ping
Result - Result of the ping request (no result)
- Progress
Params - Parameters for the progress notification
- Prompt
List Changed Params - Parameters for the prompts/list_changed notification
- Read
Resource Params - Parameters for the resources/read request
- Read
Resource Result - Result of the resources/read request
- Resource
List Changed Params - Parameters for the resources/list_changed notification
- Resource
Updated Params - Parameters for the resources/updated notification
- Sampling
Message - A message in a sampling conversation
- SetLogging
Level Params - Parameters for the logging/setLevel request
- SetLogging
Level Result - Result of the logging/setLevel request
- Subscribe
Resource Params - Parameters for the resources/subscribe request
- Subscribe
Resource Result - Result of the resources/subscribe request
- Tool
List Changed Params - Parameters for the tools/list_changed notification
- Unsubscribe
Resource Params - Parameters for the resources/unsubscribe request
- Unsubscribe
Resource Result - Result of the resources/unsubscribe request
Enums§
- Logging
Level - Logging level enumeration
- Sampling
Content - Content for sampling messages
Constants§
- MCP_
PROTOCOL_ VERSION - Constant for MCP protocol version