MCP TypeScript SDK
    Preparing search index...

    Variable isJSONRPCResponseConst

    isJSONRPCResponse: (
        value: unknown,
    ) => value is {
        id: string | number;
        jsonrpc: "2.0";
        result: {
            _meta?: {
                "io.modelcontextprotocol/related-task"?: { taskId: string };
                progressToken?: string | number;
                [key: string]: unknown;
            };
            [key: string]: unknown;
        };
    } = isJSONRPCResultResponse

    Type Declaration

      • (
            value: unknown,
        ): value is {
            id: string | number;
            jsonrpc: "2.0";
            result: {
                _meta?: {
                    "io.modelcontextprotocol/related-task"?: { taskId: string };
                    progressToken?: string | number;
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            };
        }
      • Checks if a value is a valid JSONRPCResultResponse.

        Parameters

        • value: unknown

          The value to check.

        Returns value is {
            id: string | number;
            jsonrpc: "2.0";
            result: {
                _meta?: {
                    "io.modelcontextprotocol/related-task"?: { taskId: string };
                    progressToken?: string | number;
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            };
        }

        True if the value is a valid JSONRPCResultResponse, false otherwise.

    Use isJSONRPCResultResponse instead.

    Please note that JSONRPCResponse is a union of JSONRPCResultResponse and JSONRPCErrorResponse as per the updated JSON-RPC specification. (was previously just JSONRPCResultResponse)