Skip to main content

ToolCallback

Type Alias ToolCallback 

Source
pub type ToolCallback = Arc<dyn Fn(Value) -> BoxFuture<'static, Result<Value, String>> + Send + Sync>;
Expand description

A host-side tool execute callback. Receives the validated JSON input, returns a JSON result or an error string. Stays host-side (never crosses to the guest); the guest invokes it by name via the sidecar host-callback channel.

Aliased Typeยง

pub struct ToolCallback { /* private fields */ }