Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nullclaw/nullclaw/llms.txt
Use this file to discover all available pages before exploring further.
Tools Overview
NullClaw provides 30+ built-in tools that enable agents to perform actions in the real world. Tools follow a vtable-based architecture that allows easy extension and testing.Available Tools
NullClaw ships with comprehensive tool coverage across multiple domains:File Operations (4 tools)
file_read— Read file contents with workspace scopingfile_write— Write or overwrite files with path securityfile_edit— Find and replace text in filesfile_append— Append content to files
Shell & Git (2 tools)
shell— Execute shell commands with security policy validationgit_operations— Structured Git operations (status, diff, log, commit, add, checkout, stash)
Memory (4 tools)
memory_store— Persist facts to long-term memorymemory_recall— Search memory with hybrid retrievalmemory_list— List all stored memoriesmemory_forget— Delete memory entries
Web & Browser (4 tools)
http_request— Make HTTP requests with domain allowlistingweb_search— Search via multiple providers (Brave, DuckDuckGo, Jina, Perplexity, etc.)web_fetch— Fetch and parse web pages with Jina Readerbrowser— Open URLs and fetch page contentbrowser_open— Open allowlisted URLs in default browser
Scheduling & Delegation (3 tools)
schedule— Schedule future tool executionsdelegate— Delegate tasks to named agentsspawn— Launch async subagent tasks
Hardware (5 tools)
hardware_info— Query connected hardware boardshardware_memory— Read/write hardware memory regionsi2c— I2C bus operationsspi— SPI bus operations (planned)screenshot— Capture screen regions
Cron (6 tools)
cron_add— Register cron jobscron_list— List scheduled jobscron_remove— Delete jobscron_runs— View job execution historycron_run— Manually trigger jobcron_update— Modify existing job
Integrations (4 tools)
composio— Composio API integrationpushover— Pushover notificationsmessage— Send messages to channelsimage— Image analysis and manipulation
Tool Architecture
Tool vtable Interface
All tools implement theTool vtable interface defined in src/tools/root.zig:
name()— Tool identifier for LLM function callingdescription()— Human-readable descriptionparameters_json()— JSON Schema for tool parametersexecute()— Core execution logicdeinit()— Optional cleanup function
ToolResult
Tools return aToolResult struct indicating success/failure:
outputanderror_msgare owned by the caller- Use
allocator.free()to free them after use - Exception: static strings from
ToolResult.ok("")orToolResult.fail("literal")must NOT be freed
Tool Execution Flow
- LLM generates function call with tool name and JSON arguments
- Dispatcher parses JSON into
std.json.ObjectMap - Tool vtable execute() is called with parsed args
- Tool validates inputs using
root.getString(),root.getInt(),root.getBool()helpers - Tool performs action (read file, run shell command, etc.)
- ToolResult returned with success/failure and output
- Result serialized back to LLM as assistant message
Argument Extraction Helpers
Tools use type-safe helpers to extract arguments from the parsed JSON:Tool Registration
Tools are registered in factory functions:Default Tools (3 core tools)
All Tools (30+ tools)
Subagent Tools (restricted subset)
message— prevent cross-channel side effectsspawn,delegate— prevent infinite loopsschedule— prevent uncontrolled schedulingmemory_*— prevent memory pollutioncomposio,browser_open— reduce blast radius
Tool Configuration
Tools accept configuration at initialization:Security Model
Workspace Path Scoping
All file/shell tools enforce workspace path scoping:- Relative paths resolved within
workspace_dir - Absolute paths require
allowed_pathsconfiguration - Symlinks validated after resolution
- Path traversal (
../) blocked byisPathSafe() - System-sensitive paths (e.g.,
/etc/passwd) blocked
Command Validation
Shell and Git tools sanitize inputs:- Block shell metacharacters (
;,|,>,`,$(), etc.) - Block dangerous git options (
--exec=,--pager=,-c) - Validate against
SecurityPolicy.allowed_commands - Require approval for medium/high risk commands
Domain Allowlisting
HTTP/browser tools enforce domain allowlists:- Only
https://URLs accepted (nohttp://) - Host extracted and validated against
allowed_domains - Subdomain matching supported (
api.example.commatchesexample.com) - Localhost and private IPs blocked by default
Creating a Custom Tool
Example tool implementation:Testing Tools
Tools include comprehensive test coverage:Schema Cleaning
NullClaw automatically cleans JSON schemas for LLM compatibility usingsrc/tools/schema.zig:
- Gemini — strips most validation keywords (minLength, pattern, format, etc.)
- Anthropic — removes $ref and definitions
- OpenAI — minimal cleaning (most permissive)
Next Steps
- File Operations — Read, write, edit, append files
- Shell — Execute shell commands with security policies
- Memory — Persistent memory with hybrid search
- Browser — Web browsing and content fetching
- Git — Structured Git operations