Skip to main content

TypedTool

Derive Macro TypedTool 

Source
#[derive(TypedTool)]
{
    // Attributes available to this derive:
    #[tool]
}
Expand description

Derive an agent_sdk::TypedTool impl (typed Input + runtime validation) from struct-level #[tool(...)] attributes.

See the crate-level docs. Required: name, description, and input (the typed Input type). The schema attribute is either a serde_json::Value expression (hand-provided, the 13·B baseline) or the literal string "derive" to auto-generate the schema from Input via schemars (requires this crate’s schema-derive feature).

The struct must implement agent_sdk::ToolLogic<Ctx> with type Input = <the typed input> to supply the execute body.