Skip to content

ElicitationCallback

type ElicitationCallback = (context, params) => Promise<ElicitResult>;

Defined in: src/types/elicitation.ts:21

Callback invoked when an MCP server sends an elicitation request to gather user input during tool execution.

| Parameter | Type | Description | | --------- | ---------------------------------------------- | ------------------------------------------------------------------------------ | | context | ElicitationContext | Request context including abort signal. | | params | ElicitRequestParams | The elicitation parameters from the server (message, requested schema or URL). |

Promise<ElicitResult>

The user’s response: accept (with content), decline, or cancel.