MCP TypeScript SDK (V2)
    Preparing search index...
    • Validates and parses an unknown value as a JSON-RPC message.

      Use this to validate incoming messages in custom transport implementations. Throws if the value does not conform to the JSON-RPC message schema.

      Parameters

      • value: unknown

        The value to validate (typically a parsed JSON object).

      Returns JSONRPCMessage

      The validated JSONRPCMessage.

      If validation fails.