Skip to main content
Construct portable permission decisions for canUseTool and supported hooks.

Type Declaration

allow()

Approve the request, optionally replacing its input.

Parameters

updatedInput?
Record<string, unknown> Validated replacement tool arguments.

Returns

PermissionDecision An allow decision.

Example

ask()

Delegate to the remaining permission path; this is not approval.

Returns

PermissionDecision An ask decision.

Example

deny()

Reject a request with an optional explanation.

Parameters

message?
string Reason shown to the runtime/model.

Returns

PermissionDecision A deny decision.

Example