Tools System
All 21 built-in tools that the AI agent can use to interact with the filesystem, execute code, search the web, and more.
Tool Categories
File Operations
file_read
Reads files from the filesystem. Supports text files with optional offset/limit for reading specific line ranges, image files (returns base64 for LLM description), and PDF files.
file_write
Creates or overwrites files. Automatically creates parent directories if they don't exist. Requires write permission.
file_edit
Performs find-and-replace edits on files. Uses a multi-strategy matching approach: exact match → trimmed match → case-insensitive → whitespace- ignored. This makes edits robust against minor formatting differences.
multi_edit
Applies multiple edits to a single file atomically. Edits are applied in reverse order to preserve line positions. All edits succeed or none do.
file_delete
Deletes files with permission checking and safe guards. Requires explicit delete permission from the user.
Search & Discovery
glob_search
Finds files matching glob patterns. Respects .gitignore rules and returns paths sorted by modification time.
grep_search
Searches file contents with full regex support. Case-insensitive option available.
list_dir
Lists directory contents with file type indicators. Enhanced replacement for ls.
view_repo_map
Generates a structural overview of the repository as an indented tree view. Useful for understanding project layout at a glance.
Code & Execution
shell_exec
Executes shell commands with path extraction and destructive command detection. Extracted paths are checked against read/edit/delete permission rules before execution.
file_run
Auto-detects the programming language of a file and runs it with the appropriate interpreter. Supports 14 languages: JavaScript, TypeScript, Python, Ruby, Go, Rust, Java, C, C++, PHP, Bash, Perl, Lua, and Swift.
code_verify
Runs syntax and type checking on the current project. Detects the project type (TypeScript, ESLint, etc.) and runs the appropriate checker.
Web Access
web_fetch
Fetches content from URLs, extracts the main text, and returns it. Domain access is controlled by the sandbox network configuration.
web_search
Searches the web using DuckDuckGo (no API key required). Returns titles, URLs, and snippets.
Intelligence
codebase_search
Performs intelligent search across the indexed codebase. Combines FTS5 full-text search (35%) and vector embedding similarity (65%) for comprehensive results.
view_diff
Shows git diffs for working changes, staged changes, or specific commits.
Agent Control
sub_agent
Spawns an independent sub-agent for parallel research tasks. Sub-agents have their own conversation context but share the same tool set.
todo
Manages task tracking with status management (pending, in_progress, completed). Visible to the user for progress tracking.
system_info
Queries the agent's own runtime state: current permissions, sandbox configuration, available tools, and active settings.
Adding a New Tool
To add a new tool to the system: