Function tool

Source
pub fn tool<F, Fut>(
    name: impl Into<String>,
    description: impl Into<String>,
    parameters: ToolParameterSchema,
    handler: F,
) -> ToolBox
where F: Fn(Value, ToolContext) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<ToolResult>> + Send + 'static,
Expand description

Quick helper to create a simple async tool