Skip to main content

Crate cortexai_tools

Crate cortexai_tools 

Source
Expand description

§Built-in Tools

Common tools that can be used by agents, with enhanced registry featuring circuit breaker, retry, and timeout patterns.

§Available Tools

§Math

  • CalculatorTool - Full expression evaluation with scientific functions
  • UnitConverterTool - Convert between units (length, weight, temperature)
  • StatisticsTool - Calculate mean, median, std dev, etc.

§DateTime

  • CurrentTimeTool - Get current date/time
  • DateParserTool - Parse dates in various formats
  • DateCalculatorTool - Date arithmetic and differences

§Encoding

  • JsonTool - Parse, format, merge JSON
  • Base64Tool - Encode/decode Base64
  • HashTool - SHA256/SHA512 hashing
  • UrlEncodeTool - URL encode/decode

§File System

  • ReadFileTool - Read file contents
  • WriteFileTool - Write to files
  • ListDirectoryTool - List directory contents

§Web

  • HttpRequestTool - Make HTTP requests
  • WebSearchTool - Web search (stub)

§SQL (requires postgres feature)

  • ExecuteSqlTool - Execute read-only SQL queries
  • ListTablesTool - List database tables and columns
  • DescribeTableTool - Get detailed table schema information

§Cross-Reference (requires crossref feature)

  • CrossReferenceEntityTool - Cross-reference entities across data sources with PT-BR narratives

Re-exports§

pub use datetime::*;
pub use delegation::*;
pub use encoding::*;
pub use file::*;
pub use macro_tools::*;
pub use math::*;
pub use registry::*;
pub use web::*;

Modules§

datetime
DateTime tools for time operations
delegation
Agent-to-agent delegation tools
encoding
Encoding and data transformation tools
file
File system tools
macro_tools
Tools defined using the derive macro
math
Math tools with full expression evaluation
registry
Enhanced tool registry with circuit breaker, retry, and timeout
web
Web-related tools

Structs§

ExecutionContext
Execution context for tool calls
ToolRegistry
Tool registry
ToolSchema
Tool/function schema for LLM function calling

Traits§

Tool
Tool/function trait

Functions§

create_default_registry
Create a registry with all built-in tools

Derive Macros§

Tool
Derive macro for creating Tool implementations