OptionalmaxOptionaloncloseOptionalonerrorOptionalonmessageOptionalonprogressIf set, requests progress notifications from the remote end (if supported). When progress notifications are received, this callback will be invoked.
OptionalonresumptiontokenA callback that is invoked when the resumption token changes, if supported by the transport.
This allows clients to persist the latest token for potential reconnection.
OptionalrelatedIf present, relatedRequestId is used to indicate to the transport which incoming request to associate this outgoing message with.
OptionalresetIf true, receiving a progress notification will reset the request timeout. This is useful for long-running operations that send periodic progress updates. Default: false
OptionalresumptionThe resumption token used to continue long-running requests that were interrupted.
This allows clients to reconnect and continue from where they left off, if supported by the transport.
OptionalsignalCan be used to cancel an in-flight request. This will cause an AbortError to be raised from request().
OptionaltimeoutA 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.
Maximum total time (in milliseconds) to wait for a response. If exceeded, an McpError with code
RequestTimeoutwill be raised, regardless of progress notifications. If not specified, there is no maximum total timeout.