Skip to main content
Elicitation is Toolshed’s mechanism for ensuring a human approves destructive operations before they execute. When a sandbox script calls a tool marked destructive: true, execution pauses until a human approves or denies the action.

The elicitation lifecycle

ElicitationEngine

The ElicitationEngine class manages the full lifecycle:

Key methods

Session approvals

Once a user approves a tool, the engine can remember the approval for the session. Subsequent calls to the same tool path auto-approve without pausing:

Using elicit() in plugin handlers

Inside a tool handler, call ctx.elicit() to request approval:
The elicit() function takes a single object parameter: Returns an ElicitationResponse:

Elicitation types

  • approval — simple yes/no confirmation. The most common type.
  • form — collect additional data from the user. The response includes a data object with the user’s input.