Module builder

Module builder 

Source
Expand description

Tool builder utilities for creating tools from functions

This module provides ergonomic helpers for converting regular Rust functions into Tool implementations that can be registered with agents.

Structs§

FunctionTool
A tool implementation backed by a function/closure
ToolBuilder
Builder for creating tools from async functions

Functions§

create_tool
Simple helper to create a tool from an async closure (backwards compatibility) This is a simpler API for basic tools that don’t need explicit parameter schemas. The schema will be inferred as accepting any JSON object.
tool
Quick helper to create a simple async tool
tool_sync
Quick helper to create a simple sync tool

Type Aliases§

AsyncToolFn
Type alias for async tool handler functions
SyncToolFn
Type alias for sync tool handler functions