@modelcontextprotocol/sdk
    Preparing search index...

    Type Alias RequestOptions

    RequestOptions: {
        maxTotalTimeout?: number;
        onprogress?: ProgressCallback;
        resetTimeoutOnProgress?: boolean;
        signal?: AbortSignal;
        timeout?: number;
    } & TransportSendOptions

    Options that can be given per request.

    Type Declaration

    • OptionalmaxTotalTimeout?: number

      Maximum total time (in milliseconds) to wait for a response. If exceeded, an McpError with code RequestTimeout will be raised, regardless of progress notifications. If not specified, there is no maximum total timeout.

    • Optionalonprogress?: ProgressCallback

      If set, requests progress notifications from the remote end (if supported). When progress notifications are received, this callback will be invoked.

    • OptionalresetTimeoutOnProgress?: boolean

      If true, receiving a progress notification will reset the request timeout. This is useful for long-running operations that send periodic progress updates. Default: false

    • Optionalsignal?: AbortSignal

      Can be used to cancel an in-flight request. This will cause an AbortError to be raised from request().

    • Optionaltimeout?: number

      A timeout (in milliseconds) for this request. If exceeded, an McpError with code RequestTimeout will be raised from request().

      If not specified, DEFAULT_REQUEST_TIMEOUT_MSEC will be used as the timeout.