Skip to contents

Return this from a can_use_tool callback or a PermissionRequest hook to allow a tool call.

Usage

PermissionResultAllow(message = NULL)

Arguments

message

Optional note stored on the result. Deputy doesn't show it to the model or the user.

Value

A PermissionResultAllow object.

See also

CallbackResult for reading result fields.

Examples

# Allow a tool call
PermissionResultAllow()
#> <deputy::PermissionResultAllow>
#>  @ decision: chr "allow"
#>  @ message : NULL

# Allow with a message
PermissionResultAllow(message = "Tool approved by custom callback")
#> <deputy::PermissionResultAllow>
#>  @ decision: chr "allow"
#>  @ message : chr "Tool approved by custom callback"