Requests or reads one keyed elicitation in a multi-round-trip tool callback.
The explicit key correlates the request with the client's response on
re-entry. On the first entry, or after an invalid form response, this returns
{ status: "required", result }; return that result from the tool. On
re-entry it returns accept, decline, or cancel and validates accepted
Standard Schema form data before exposing it. Validation may be synchronous
or asynchronous.
Example
constconfirmation = awaitctx.elicit( "confirm", "Deploy to production?", schema, ); if (confirmation.status === "required") { returnconfirmation.result; }
Requests or reads one keyed elicitation in a multi-round-trip tool callback.
The explicit key correlates the request with the client's response on re-entry. On the first entry, or after an invalid form response, this returns
{ status: "required", result }; return that result from the tool. On re-entry it returnsaccept,decline, orcanceland validates accepted Standard Schema form data before exposing it. Validation may be synchronous or asynchronous.Example