pub trait PermissionChecker: Send + Sync {
// Required method
fn check(&self, tool_name: &str, args: &Value) -> PermissionDecision;
}Expand description
Trait for checking tool execution permissions.
Implement this trait to provide custom permission logic.
The built-in PermissionPolicy implements this trait using
declarative allow/deny/ask rules with pattern matching.
Required Methods§
Sourcefn check(&self, tool_name: &str, args: &Value) -> PermissionDecision
fn check(&self, tool_name: &str, args: &Value) -> PermissionDecision
Check whether a tool invocation is allowed, denied, or requires confirmation.