Procedural macros for the Appam AI agent framework.
This crate provides the #[tool] attribute macro for easily defining tools
that can be used by AI agents with support for parameter descriptions and defaults.
Examples
use appam_macros::tool;
#[tool(description = "Echoes back the input message")]
fn echo(
#[arg(description = "Message to echo")]
message: String,
) -> anyhow::Result<String> {
Ok(message)
}
// With optional parameters
#[tool(description = "Search with options")]
fn search(
#[arg(description = "Search query")]
query: String,
#[arg(description = "Max results", default = 10)]
max_results: u32,
) -> anyhow::Result<Vec<String>> {
// Implementation
Ok(vec![])
}