jsonrpc
This module follows the JSON-RPC 2.0 specification: https://www.jsonrpc.org/specification.
RequestId
module-attribute
The ID of a JSON-RPC request.
JSONRPCRequest
Bases: BaseModel
A JSON-RPC request that expects a response.
Source code in src/mcp/types/jsonrpc.py
13 14 15 16 17 18 19 | |
JSONRPCNotification
Bases: BaseModel
A JSON-RPC notification which does not expect a response.
Source code in src/mcp/types/jsonrpc.py
22 23 24 25 26 27 | |
JSONRPCResponse
Bases: BaseModel
A successful (non-error) response to a request.
Source code in src/mcp/types/jsonrpc.py
31 32 33 34 35 36 | |
URL_ELICITATION_REQUIRED
module-attribute
URL_ELICITATION_REQUIRED = -32042
Error code indicating that a URL mode elicitation is required before the request can be processed.
ErrorData
Bases: BaseModel
Error information for JSON-RPC error responses.
Source code in src/mcp/types/jsonrpc.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |
message
instance-attribute
message: str
A short description of the error.
The message SHOULD be limited to a concise single sentence.
data
class-attribute
instance-attribute
data: Any = None
Additional information about the error.
The value of this member is defined by the sender (e.g. detailed error information, nested errors, etc.).
JSONRPCError
Bases: BaseModel
A response to a request that indicates an error occurred.
Source code in src/mcp/types/jsonrpc.py
74 75 76 77 78 79 | |