Evaluate whether a tool call may proceed. Call at the top of a destructive
tool's handler; if ok is false, return toolError(result.error).
Under the confirm policy, approval can be supplied by the legacy
model-provided confirm: true fallback, or by the audited tool wrapper
installing elicitation consent after validating server-minted requestState.
New handlers should keep calling this function normally.
Evaluate whether a tool call may proceed. Call at the top of a destructive tool's handler; if
okis false, returntoolError(result.error).Under the
confirmpolicy, approval can be supplied by the legacy model-providedconfirm: truefallback, or by the audited tool wrapper installing elicitation consent after validating server-minted requestState. New handlers should keep calling this function normally.