Expand description
Toolkit of built-in tools and utilities for AI agents
This crate provides:
- Built-in tools (filesystem, todos, etc.)
#[tool]
macro for automatic tool generation- Tool builder utilities for advanced custom tools
- Tool registration and management helpers
§Recommended Usage
Use the #[tool]
macro to define tools:
use agents_macros::tool;
#[tool("Adds two numbers together")]
pub fn add(a: i32, b: i32) -> i32 {
a + b
}
// Use it:
let tool = AddTool::as_tool();
Re-exports§
pub use builder::tool;
pub use builder::tool_sync;
pub use builder::ToolBuilder;
pub use builtin::create_filesystem_tools;
pub use builtin::create_todos_tool;
pub use builtin::create_todos_tools;
pub use builtin::EditFileTool;
pub use builtin::LsTool;
pub use builtin::ReadFileTool;
pub use builtin::ReadTodosTool;
pub use builtin::WriteFileTool;
pub use builtin::WriteTodosTool;
Modules§
- builder
- Tool builder utilities for creating tools from functions
- builtin
- Built-in tools for common agent operations
Structs§
- Tool
Context - Context provided to tool implementations for accessing agent state and utilities
- Tool
Parameter Schema - JSON Schema definition for tool parameters
- Tool
Registry - Tool registry for managing and discovering available tools
- Tool
Schema - Complete schema definition for a tool
Enums§
- Tool
Result - Result of a tool invocation
Traits§
- Tool
- Core trait for tool implementations
Type Aliases§
- ToolBox
- Type alias for boxed tool instances
Attribute Macros§
- tool
- Converts a Rust function into an AI agent tool with automatic schema generation.