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§
- Client
Capabilities - Capabilities advertised by an MCP client
- Client
Info - Information about an MCP client
- Json
RpcError - JSON-RPC 2.0 error information
- Json
RpcNotification - JSON-RPC 2.0 notification message
- Json
RpcRequest - JSON-RPC 2.0 request message
- Json
RpcResponse - JSON-RPC 2.0 response message
- Prompt
Argument - Argument for a prompt
- Prompt
Info - Information about a prompt
- Prompt
Message - Message in a prompt result
- Prompt
Result - Result of prompt execution
- Prompts
Capability - Prompt-related server capabilities
- Resource
Content - Content of a resource
- Resource
Info - Information about a resource
- Resources
Capability - Resource-related server capabilities
- Sampling
Capability - Sampling-related capabilities
- Server
Capabilities - Capabilities advertised by an MCP server
- Server
Info - Information about an MCP server
- Tool
Info - Information about a tool
- Tool
Result - Result of a tool execution
- Tools
Capability - Tool-related server capabilities
Enums§
- Content
- Content that can be returned by tools, resources, or prompts
- Prompt
Content - 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