tool
Defined in the Derive Macros module.Rust AI Agent SDK
#[tool] attribute macro for defining tools. This macro transforms a function into a tool that can be used by agents. # Attributes - description: A description of what the tool does (required for LLM understanding) - name: Override the tool name (defaults to function name)
Parameters
| Name | Type | Description |
|---|---|---|
attr | TokenStream | - |
item | TokenStream | - |

