Skip to main content

lc_tools/
lib.rs

1#![warn(missing_docs)]
2// lc-tools/src/lib.rs
3//! Built-in tools for langchainrust.
4//!
5//! Provides a collection of ready-to-use tools for agents:
6//! - `Calculator`: Math expression evaluation
7//! - `DateTimeTool`: Date/time queries and calculations
8//! - `SimpleMathTool`: Advanced math operations
9//! - `PythonREPLTool`: Python code execution (disabled by default)
10//! - `DuckDuckGoSearchTool`: Web search via DuckDuckGo
11//! - `URLFetchTool`: Web page fetching and parsing
12//! - `WikipediaTool`: Wikipedia search
13//! - `FileTool`: Sandboxed file operations
14//! - `HTTPTool`: HTTP requests with SSRF protection
15//! - `SQLTool`: Read-only SQL queries (feature-gated)
16//! - `ComputerUseTool`: Screen interaction via Anthropic API
17//! - `SandboxTool` / `LocalSandbox`: Code execution sandbox
18
19mod calculator;
20mod datetime;
21mod expr_eval;
22pub mod extended;
23mod math;
24mod python_repl;
25pub mod sandbox;
26mod search;
27mod skills;
28mod ssrf;
29mod url_fetch;
30mod wikipedia;
31
32pub use calculator::{Calculator, CalculatorInput, CalculatorOutput};
33pub use datetime::{DateTimeInput, DateTimeOutput, DateTimeTool};
34pub use extended::{
35    ComputerMode, ComputerUseInput, ComputerUseOutput, ComputerUseTool, FileTool, HTTPTool,
36};
37pub use math::{MathInput, MathOutput, SimpleMathTool};
38pub use python_repl::{PythonREPLInput, PythonREPLOutput, PythonREPLTool};
39pub use sandbox::{CodeSandbox, Language, LocalSandbox, RunResult, SandboxError, SandboxTool};
40pub use skills::{Skill, SkillError, SkillFrontmatter};
41pub use search::{DuckDuckGoSearchTool, SearchInput, SearchOutput};
42pub use url_fetch::{URLFetchInput, URLFetchOutput, URLFetchTool};
43pub use wikipedia::{WikipediaInput, WikipediaOutput, WikipediaTool};
44
45// Re-export core tool types for convenience
46pub use lc_core::tools::{BaseTool, Tool, ToolError};
47
48// Re-export #[tool] procedural macro
49pub use lc_tools_derive::tool;