Skip to main content

Binding

Trait Binding 

Source
pub trait Binding: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn call<'a>(
        &'a self,
        tool_def: &'a ToolDefinition,
        args: Value,
        ctx: &'a CallContext,
    ) -> BindingFuture<'a>;
}
Expand description

A tool’s execution binding. name() returns a short discriminator ("native", "cli", "mcp", …) used by observability hooks and tests.

Required Methods§

Source

fn name(&self) -> &'static str

Source

fn call<'a>( &'a self, tool_def: &'a ToolDefinition, args: Value, ctx: &'a CallContext, ) -> BindingFuture<'a>

Implementors§