Skip to main content

Module protocol

Module protocol 

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

CallToolParams
MCP tools/call request parameters
CallToolResult
MCP tools/call response
JsonRpcError
JSON-RPC 2.0 Error
JsonRpcRequest
JSON-RPC 2.0 Request
JsonRpcResponse
JSON-RPC 2.0 Response
ListToolsParams
MCP tools/list request parameters
ListToolsResult
MCP tools/list response
McpCapabilities
MCP server capabilities.
McpServerInfo
MCP server information.
McpToolDef
MCP Tool Definition (from tools/list response)
ToolDefinition
Tool definition for LLM providers.
ToolInputSchema
JSON Schema for tool inputs (legacy format)

Enums§

JsonRpcId
JSON-RPC ID can be string, number, or null
JsonRpcPayload
ToolContent
Tool execution content (text or other types)

Constants§

MCP_PROTOCOL_VERSION
Current MCP protocol version.