Skip to main content

Crate lc_tools

Crate lc_tools 

Source
Expand description

Built-in tools for langchainrust.

Provides a collection of ready-to-use tools for agents:

  • Calculator: Math expression evaluation
  • DateTimeTool: Date/time queries and calculations
  • SimpleMathTool: Advanced math operations
  • PythonREPLTool: Python code execution (disabled by default)
  • DuckDuckGoSearchTool: Web search via DuckDuckGo
  • HostedSearchTool: hosted search backends (Tavily / Serper / Exa), see hosted_search
  • URLFetchTool: Web page fetching and parsing
  • WikipediaTool: Wikipedia search
  • FileTool: Sandboxed file operations
  • HTTPTool: HTTP requests with SSRF protection
  • SQLTool: Read-only SQL queries (feature-gated)
  • ComputerUseTool: Screen interaction via Anthropic API
  • SandboxTool / LocalSandbox: Code execution sandbox

Re-exports§

pub use extended::ComputerMode;
pub use extended::ComputerUseInput;
pub use extended::ComputerUseOutput;
pub use extended::ComputerUseTool;
pub use extended::FileTool;
pub use extended::HTTPTool;
pub use hosted_search::HostedSearchTool;
pub use sandbox::CodeSandbox;
pub use sandbox::Language;
pub use sandbox::LocalSandbox;
pub use sandbox::RunResult;
pub use sandbox::SandboxError;
pub use sandbox::SandboxTool;

Modules§

extended
Tool extensions: HTTP / File / SQL / ComputerUse
hosted_search
Hosted web-search backends behind one unified result shape (B6, v0.22.4).
sandbox
Code Interpreter Sandbox for pluggable code execution.

Structs§

Calculator
Calculator tool
CalculatorInput
Calculator input
CalculatorOutput
Calculator output
DateTimeInput
DateTime tool input parameters.
DateTimeOutput
DateTime tool output result.
DateTimeTool
DateTime tool for querying and manipulating dates and times.
DuckDuckGoSearchTool
DuckDuckGo web search tool
MathInput
Math tool input parameters.
MathOutput
Math tool output result.
PythonREPLInput
Python REPL tool input
PythonREPLOutput
Python REPL tool output
PythonREPLTool
Python code execution tool
SearchInput
Search tool input
SearchOutput
Search tool output
SimpleMathTool
Advanced math tool for agents.
Skill
A parsed, loadable skill unit.
SkillFrontmatter
Required head matter of a SKILL.md file.
URLFetchInput
URLFetch tool input
URLFetchOutput
URLFetch tool output
URLFetchTool
Web page fetching tool
WikipediaInput
Wikipedia tool input
WikipediaOutput
Wikipedia tool output
WikipediaTool
Wikipedia search tool

Enums§

SkillError
Error while loading or parsing a skill bundle.
ToolError
Tool error type.

Traits§

BaseTool
Base tool trait (object-safe version).
Tool
Generic tool trait (type-safe version).

Attribute Macros§

tool
The #[tool] procedural macro.