Skip to main content

Module tools

Module tools 

Source
Expand description

Extensible Tool System

Provides a trait-based abstraction for tools that can be:

  • Built-in (Rust implementations)
  • Binary (external executables)
  • HTTP (API calls)
  • Script (interpreted scripts)

§Architecture

ToolRegistry
  ├── builtin tools (bash, read, write, edit, grep, glob, ls)
  ├── native tools (search_skills, install_skill, load_skill)
  └── dynamic tools (loaded from skills)
        ├── BinaryTool
        ├── HttpTool
        └── ScriptTool

Re-exports§

pub use skill::builtin_skills;
pub use skill::load_skills;
pub use skill::Skill;
pub use skill::SkillKind;
pub use skill::ToolPermission;
pub use task::parallel_task_params_schema;
pub use task::task_params_schema;
pub use task::ParallelTaskParams;
pub use task::ParallelTaskTool;
pub use task::TaskExecutor;
pub use task::TaskParams;
pub use task::TaskResult;

Modules§

skill
Skill System
task
Task Tool for Spawning Subagents

Structs§

ToolContext
Tool execution context
ToolExecutor
Tool executor with workspace sandboxing
ToolOutput
Tool execution output
ToolRegistry
Tool registry for managing all available tools
ToolResult
Tool execution result (legacy format for backward compatibility)

Enums§

ToolBackend
Tool backend type for dynamic tools
ToolStreamEvent
Events emitted by tools during execution

Constants§

DEFAULT_CATALOG_THRESHOLD
Default threshold for switching to catalog mode. When the number of instruction-kind skills exceeds this, a lightweight catalog is injected instead of full content.
MAX_LINE_LENGTH
Maximum line length before truncation
MAX_OUTPUT_SIZE
Maximum output size in bytes before truncation
MAX_READ_LINES
Maximum lines to read from a file

Traits§

Tool
Tool trait - the core abstraction for all tools

Functions§

build_skills_injection
Build the skills injection for the system prompt.
create_tool
Create a dynamic tool from a backend specification.

Type Aliases§

ToolEventSender
Sender for streaming tool output deltas during execution.