adk-macros
Proc macros for ADK-Rust that eliminate tool registration boilerplate.
#[tool]
Turns an async function into a fully-wired [adk_tool::Tool] implementation:
use tool;
use JsonSchema;
use Deserialize;
/// Get the current weather for a city.
async
// This generates a struct `GetWeather` that implements `adk_tool::Tool`.
// Use it like: Arc::new(GetWeather)
The macro:
- Uses the function's doc comment as the tool description
- Derives the JSON schema from the argument type via
schemars::schema_for! - Names the tool after the function (snake_case)
- Generates a zero-sized struct (PascalCase) implementing
Tool