create_simple_tool

Function create_simple_tool 

Source
pub fn create_simple_tool<F>(
    name: impl Into<String>,
    description: impl Into<String>,
    func: F,
) -> Tool
where F: Fn(String) -> Result<String> + Send + Sync + 'static,
Expand description

Create a simple string-to-string tool from a function.

This is useful for tools that take a single string input and return a string.