Module messages

Source
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§

CallToolParams
Parameters for the tools/call request
CallToolResult
Result of the tools/call request
CreateMessageParams
Parameters for the sampling/createMessage request
CreateMessageResult
Result of the sampling/createMessage request
GetPromptParams
Parameters for the prompts/get request
GetPromptResult
Result of the prompts/get request
InitializeParams
Parameters for the initialize request
InitializeResult
Result of the initialize request
ListPromptsParams
Parameters for the prompts/list request
ListPromptsResult
Result of the prompts/list request
ListResourcesParams
Parameters for the resources/list request
ListResourcesResult
Result of the resources/list request
ListToolsParams
Parameters for the tools/list request
ListToolsResult
Result of the tools/list request
LoggingMessageParams
Parameters for the logging/message notification
ModelPreferences
Model preferences for sampling
PingParams
Parameters for the ping request (no parameters)
PingResult
Result of the ping request (no result)
ProgressParams
Parameters for the progress notification
PromptListChangedParams
Parameters for the prompts/list_changed notification
ReadResourceParams
Parameters for the resources/read request
ReadResourceResult
Result of the resources/read request
ResourceListChangedParams
Parameters for the resources/list_changed notification
ResourceUpdatedParams
Parameters for the resources/updated notification
SamplingMessage
A message in a sampling conversation
SetLoggingLevelParams
Parameters for the logging/setLevel request
SetLoggingLevelResult
Result of the logging/setLevel request
SubscribeResourceParams
Parameters for the resources/subscribe request
SubscribeResourceResult
Result of the resources/subscribe request
ToolListChangedParams
Parameters for the tools/list_changed notification
UnsubscribeResourceParams
Parameters for the resources/unsubscribe request
UnsubscribeResourceResult
Result of the resources/unsubscribe request

Enums§

LoggingLevel
Logging level enumeration
SamplingContent
Content for sampling messages

Constants§

MCP_PROTOCOL_VERSION
Constant for MCP protocol version