Skip to content

Tools

Tools are the actions your agent can take. Each tool implements the Tool trait with a name, description, parameter schema, and an async execute method.

When an LLM decides to use a tool, it returns a structured tool call with a name and JSON arguments. The agent loop:

  1. Looks up the tool by name in the registry
  2. Checks the approval gate (if configured)
  3. Calls execute() with the arguments and a ToolContext
  4. Sanitizes the result (strips large blobs, truncates)
  5. Returns the result to the LLM

Every tool receives a ToolContext containing:

  • workspace — Path to the agent’s workspace directory
  • channel — The originating channel name (e.g., “telegram”)
  • chat_id — The originating chat/conversation ID

ZeptoClaw ships with 32 built-in tools:

ToolDescription
shellExecute shell commands (with optional container isolation)
read_fileRead file contents from workspace
write_fileWrite or create files in workspace
list_filesList directory contents
edit_fileSearch-and-replace edits (string or unified diff mode)
grepSearch file contents by regex pattern across the workspace
findFind files by glob pattern (e.g. **/*.rs)
web_searchWeb search via Brave API
web_fetchFetch and parse web pages
http_requestGeneral-purpose HTTP client for arbitrary API calls
memorySearch workspace memory (markdown files)
longterm_memoryPersistent key-value store with categories and tags
messageSend proactive messages to channels
cronSchedule recurring tasks
spawnDelegate background tasks
delegateCreate sub-agents (agent swarms)
whatsappSend WhatsApp messages via Cloud API
gsheetsRead and write Google Sheets
r8rR8r workflow integration
reminderPersistent reminders with cron delivery
gitGit operations (status, diff, log, commit)
projectProject scaffolding and management
stripeStripe API integration for payment operations
pdf_readExtract text from PDF files (feature-gated)
transcribeAudio transcription with provider abstraction
screenshotCapture webpage screenshots (feature-gated)
find_skillsSearch the skill registry
install_skillInstall skills from the registry
androidAndroid device control via ADB (feature-gated)
hardwareGPIO, serial, and USB peripheral operations (feature-gated)

Some tools are feature-gated and require compile-time flags: --features tool-pdf for PDF, --features screenshot for screenshots, --features android for Android, --features hardware for hardware peripherals.

grep and find are disabled by default to keep the core runtime portable for IoT and embedded environments where bash may not be available. Enable them by:

  • Using the coder template: zeptoclaw agent --template coder -m "..."
  • Setting tools.coding_tools: true in ~/.zeptoclaw/config.json
  • Setting ZEPTOCLAW_TOOLS_CODING_TOOLS=true env var

When the LLM returns multiple tool calls in one response, ZeptoClaw executes them concurrently using futures::future::join_all. This reduces latency when tools are independent.

Tool results are sanitized before being sent back to the LLM:

  • Base64 data URIs are replaced with [base64 data removed]
  • Hex blobs (>100 chars) are replaced with [hex data removed]
  • Results exceeding 50KB are truncated

This prevents token waste from large binary outputs.

You can add custom tools without modifying ZeptoClaw’s source code using the plugin system. Plugins are JSON manifests that define tool name, parameters, and a command template.