Module types

Source
Expand description

MCP protocol type definitions

This module contains all the core types defined by the Model Context Protocol specification, including messages, capabilities, and content types.

Structs§

ClientCapabilities
Capabilities advertised by an MCP client
ClientInfo
Information about an MCP client
JsonRpcError
JSON-RPC 2.0 error information
JsonRpcNotification
JSON-RPC 2.0 notification message
JsonRpcRequest
JSON-RPC 2.0 request message
JsonRpcResponse
JSON-RPC 2.0 response message
PromptArgument
Argument for a prompt
PromptInfo
Information about a prompt
PromptMessage
Message in a prompt result
PromptResult
Result of prompt execution
PromptsCapability
Prompt-related server capabilities
ResourceContent
Content of a resource
ResourceInfo
Information about a resource
ResourcesCapability
Resource-related server capabilities
SamplingCapability
Sampling-related capabilities
ServerCapabilities
Capabilities advertised by an MCP server
ServerInfo
Information about an MCP server
ToolInfo
Information about a tool
ToolResult
Result of a tool execution
ToolsCapability
Tool-related server capabilities

Enums§

Content
Content that can be returned by tools, resources, or prompts
PromptContent
Content of a prompt message

Constants§

INTERNAL_ERROR
Internal JSON-RPC error
INVALID_PARAMS
Invalid method parameter(s)
INVALID_REQUEST
The JSON sent is not a valid Request object
METHOD_NOT_FOUND
The method does not exist / is not available
PARSE_ERROR
Invalid JSON was received
PROMPT_NOT_FOUND
Prompt not found
RESOURCE_NOT_FOUND
Resource not found
TOOL_NOT_FOUND
Tool not found