-32603 http/jsonrpc.ts
JSON-RPC 2.0 envelope schemas for RPC dispatch and SAES transport.
Following MCP, params and result are object-only (no positional arrays).
MCP _meta types (JsonrpcMcpMeta, JsonrpcRequestParamsMeta) are
exported as building blocks for per-action schemas but are NOT validated
at the envelope level — _meta content validation belongs in per-action
schemas where it produces the correct error code (invalid_params, not
invalid_request).
@source https://github.com/modelcontextprotocol/typescript-sdk @see https://www.jsonrpc.org/specification
Declarations #
27 declarations
JSONRPC_INTERNAL_ERROR #
JSONRPC_INVALID_PARAMS #
-32602 JSONRPC_INVALID_REQUEST #
-32600 JSONRPC_METHOD_NOT_FOUND #
-32601 JSONRPC_PARSE_ERROR #
-32700 JSONRPC_SERVER_ERROR_END #
-32099 End of the server-defined error code range (-32099).
JSONRPC_SERVER_ERROR_START #
-32000 Start of the server-defined error code range (-32000).
JSONRPC_VERSION #
"2.0" JsonrpcErrorCode #
ZodUnion<readonly [ZodLiteral<-32700>, ZodLiteral<-32600>, ZodLiteral<-32601>, ZodLiteral<-32602>, ZodLiteral<-32603>, $ZodBranded<...>]> A valid JSON-RPC error code — one of the 5 standard codes or a server-defined code in the -32000 to -32099 range.
JsonrpcErrorObject #
ZodObject<{ code: ZodUnion<readonly [ZodLiteral<-32700>, ZodLiteral<-32600>, ZodLiteral<-32601>, ZodLiteral<-32602>, ZodLiteral<-32603>, $ZodBranded<...>]>; message: ZodString; data: ZodOptional<...>; }, $loose> Error object within a JSON-RPC error response.
JsonrpcErrorResponse #
ZodObject<{ jsonrpc: ZodLiteral<"2.0">; id: ZodNullable<ZodUnion<readonly [ZodString, ZodNumber]>>; error: ZodObject<{ code: ZodUnion<readonly [ZodLiteral<-32700>, ... 4 more ..., $ZodBranded<...>]>; message: ZodString; data: ZodOptional<...>; }, $loose>; }, $loose> A response that indicates an error occurred.
JsonrpcMcpMeta #
ZodObject<{}, $loose> MCP metadata object — loose to allow additional properties and .extend.
JsonrpcMessage #
ZodUnion<readonly [ZodObject<{ jsonrpc: ZodLiteral<"2.0">; id: ZodUnion<readonly [ZodString, ZodNumber]>; method: ZodString; params: ZodOptional<ZodObject<{}, $loose>>; }, $loose>, ZodObject<...>, ZodObject<...>, ZodObject<...>]> Any valid JSON-RPC message (request, notification, response, or error response).
JsonrpcMessageFromClientToServer #
ZodUnion<readonly [ZodObject<{ jsonrpc: ZodLiteral<"2.0">; id: ZodUnion<readonly [ZodString, ZodNumber]>; method: ZodString; params: ZodOptional<ZodObject<{}, $loose>>; }, $loose>, ZodObject<...>]> Messages a client can send to a server (request or notification).
JsonrpcMessageFromServerToClient #
ZodUnion<readonly [ZodObject<{ jsonrpc: ZodLiteral<"2.0">; method: ZodString; params: ZodOptional<ZodObject<{}, $loose>>; }, $loose>, ZodObject<...>, ZodObject<...>]> Messages a server can send to a client (notification, response, or error response).
JsonrpcMethod #
ZodString A JSON-RPC method name.
JsonrpcNotification #
ZodObject<{ jsonrpc: ZodLiteral<"2.0">; method: ZodString; params: ZodOptional<ZodObject<{}, $loose>>; }, $loose> A notification which does not expect a response.
JsonrpcNotificationParams #
ZodObject<{}, $loose> Notification params — loose object. Per-action schemas validate _meta content.
JsonrpcProgressToken #
ZodUnion<readonly [ZodString, ZodNumber]> A progress token, used to associate progress notifications with the original request.
JsonrpcRequest #
ZodObject<{ jsonrpc: ZodLiteral<"2.0">; id: ZodUnion<readonly [ZodString, ZodNumber]>; method: ZodString; params: ZodOptional<ZodObject<{}, $loose>>; }, $loose> A request that expects a response.
JsonrpcRequestId #
ZodUnion<readonly [ZodString, ZodNumber]> A uniquely identifying id for a request in JSON-RPC. Like MCP, excludes null.
JsonrpcRequestParams #
ZodObject<{}, $loose> Request params — loose object. Per-action schemas validate _meta content.
JsonrpcRequestParamsMeta #
ZodObject<{ progressToken: ZodOptional<ZodUnion<readonly [ZodString, ZodNumber]>>; }, $loose> Request params metadata — extends MCP meta with optional progress token.
JsonrpcResponse #
ZodObject<{ jsonrpc: ZodLiteral<"2.0">; id: ZodUnion<readonly [ZodString, ZodNumber]>; result: ZodObject<{}, $loose>; }, $loose> A successful (non-error) response to a request.
JsonrpcResponseOrError #
ZodUnion<readonly [ZodObject<{ jsonrpc: ZodLiteral<"2.0">; id: ZodUnion<readonly [ZodString, ZodNumber]>; result: ZodObject<{}, $loose>; }, $loose>, ZodObject<...>]> A successful response or an error response.
JsonrpcResult #
ZodObject<{}, $loose> Result — loose object. Per-action schemas validate _meta content.
JsonrpcServerErrorCode #
$ZodBranded<ZodNumber, "JsonrpcServerErrorCode", "out"> A server-defined error code in the -32000 to -32099 range.