Type Alias: MCPRequestOptions
MCPRequestOptions =
object&TransportSendOptions
Defined in: node_modules/.bun/@modelcontextprotocol+client@2.2.0/node_modules/@modelcontextprotocol/client/dist/index-D_QDtbiv.d.mts:1836
Options that can be given per request.
Type Declaration
allowInputRequired?
optionalallowInputRequired?:boolean
Manual multi-round-trip mode for this call (protocol revision
2026-07-28): when the response is an input_required result, hand it
back to the caller instead of auto-fulfilling it (or raising a typed
error). The resolved value is the neutral input-required shape
(resultType: 'input_required', inputRequests?, requestState?);
wrap the result schema with withInputRequired() on the explicit
schema path to type both outcomes. The caller is then responsible for
gathering the requested input and retrying the original request with
inputResponses / requestState params and a fresh request.
Default: false.
maxTotalTimeout?
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.
For multi-round-trip requests fulfilled by the auto-fulfilment driver (protocol revision 2026-07-28), the budget bounds the WHOLE flow: every retry leg is given only the time remaining.
onprogress?
optionalonprogress?:ProgressCallback
If set, requests progress notifications from the remote end (if supported). When progress notifications are received, this callback will be invoked.
resetTimeoutOnProgress?
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
signal?
optionalsignal?:AbortSignal
Can be used to cancel an in-flight request. This will cause an AbortError to be raised from Protocol.request | request().
timeout?
optionaltimeout?:number
A timeout (in milliseconds) for this request. If exceeded, an SdkError with code SdkErrorCode.RequestTimeout will be raised from Protocol.request | request().
If not specified, DEFAULT_REQUEST_TIMEOUT_MSEC will be used as the timeout.