Expand description
MCP JSON-RPC Protocol Types
This module defines the core JSON-RPC 2.0 protocol types used for communicating with Model Context Protocol (MCP) servers.
Modules§
- error_
codes - Standard JSON-RPC error codes
Structs§
- Call
Tool Params - MCP tools/call request parameters
- Call
Tool Result - MCP tools/call response
- Json
RpcError - JSON-RPC 2.0 Error
- Json
RpcRequest - JSON-RPC 2.0 Request
- Json
RpcResponse - JSON-RPC 2.0 Response
- List
Tools Params - MCP tools/list request parameters
- List
Tools Result - MCP tools/list response
- McpCapabilities
- MCP server capabilities.
- McpServer
Info - MCP server information.
- McpTool
Def - MCP Tool Definition (from tools/list response)
- Tool
Definition - Tool definition for LLM providers.
- Tool
Input Schema - JSON Schema for tool inputs (legacy format)
Enums§
- Json
RpcId - JSON-RPC ID can be string, number, or null
- Json
RpcPayload - Tool
Content - Tool execution content (text or other types)
Constants§
- MCP_
PROTOCOL_ VERSION - Current MCP protocol version.