Skip to main content

ToolGate

Trait ToolGate 

Source
pub trait ToolGate:
    Debug
    + Send
    + Sync {
    // Required method
    async fn permitted(
        &self,
        params: &dyn GateableToolParams,
    ) -> Result<(), String>;
}
Expand description

Permission gate for tool call execution

Required Methods§

Source

async fn permitted(&self, params: &dyn GateableToolParams) -> Result<(), String>

Ask for permission to execute the given tool call.

Rejection must be indicated by returning an error.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§