#[aitool]Expand description
Attribute macro to register a free-standing Rust function as an AI tool.
Usage:
use reductool::aitool;
#[aitool]
/// Add two numbers
fn add(a: i32, b: i32) -> i32 { a + b }Notes:
- Only free functions are supported (no
selfreceiver). - Parameters must be simple identifiers like
arg: T. Patterns such as(_: T),(a, b): (T, U), orS { x, y }: Sare rejected. - Optional parameters are expressed as
Option<T>and will be omitted from the generated"required"list. - Supported parameter type mappings to JSON Schema are documented in this crate’s README under “Supported parameter types”.