Skip to main content

Crate cersei_tools_derive

Crate cersei_tools_derive 

Source
Expand description

cersei-tools-derive: Proc macro for deriving the Tool trait.

Usage:

#[derive(Tool)]
#[tool(name = "my_tool", description = "Does something", permission = "read_only")]
struct MyTool;

#[async_trait]
impl ToolExecute for MyTool {
    type Input = MyInput;
    async fn run(&self, input: MyInput, ctx: &ToolContext) -> ToolResult { ... }
}

Derive Macros§

Tool