Skip to main content

simple_tool

Macro simple_tool 

Source
macro_rules! simple_tool {
    (
        name: $name:expr,
        description: $desc:expr,
        parameters: $params:expr,
        handler: $handler:expr
    ) => { ... };
}
Expand description

Helper macro for creating simple tools

§Example

simple_tool!(
    name: "get_time",
    description: "Get the current time",
    handler: |_args| async {
        Ok(chrono::Utc::now().to_rfc3339())
    }
);