MCP TypeScript SDK (V2)
    Preparing search index...
    RequestOptions: {
        maxTotalTimeout?: number;
        onprogress?: ProgressCallback;
        relatedTask?: RelatedTaskMetadata;
        resetTimeoutOnProgress?: boolean;
        signal?: AbortSignal;
        task?: TaskCreationParams;
        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 SdkError with code SdkErrorCode.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.

      For task-augmented requests: progress notifications continue after CreateTaskResult is returned and stop automatically when the task reaches a terminal status.

    • OptionalrelatedTask?: RelatedTaskMetadata

      If provided, associates this request with a related task.

    • 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().

    • Optionaltask?: TaskCreationParams

      If provided, augments the request with task creation parameters to enable call-now, fetch-later execution patterns.

    • Optionaltimeout?: number

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

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