Skip to main content

Overview

Tools are NullClaw’s capability layer for LLM function calling. Every tool implements the Tool vtable interface, enabling the agent to execute system commands, file I/O, API calls, and hardware interactions.

Tool Interface

Available Tools (30+)

File System Tools

Shell Execution

Memory Tools

Web Tools

Git Tools

Hardware Tools

Scheduling Tools

Agent Tools

Messaging Tools

Integration Tools

Tool Execution Flow

Step-by-Step

  1. LLM returns tool calls in ChatResponse.tool_calls:
  2. Agent dispatcher looks up tool by name
  3. Parses arguments from JSON string to JsonObjectMap
  4. Security policy check:
    • Workspace scoping (file paths)
    • Command allowlist (shell commands)
    • Risk classification (high-risk commands)
  5. Tool execution via vtable.execute():
  6. Result formatting:
  7. Next LLM call with tool result in context

Security Boundaries

Workspace Scoping

By default, file tools are restricted to ~/.nullclaw/workspace/:
Path validation:
  • Null byte injection blocked
  • Symlink escape detection
  • Absolute path resolution
  • Parent directory traversal blocked (unless in allowed_paths)

Command Allowlist

Shell tool enforces command allowlist:
Risk levels:
  • High: rm -rf, dd, mkfs, shutdown, reboot
  • Medium: sudo, curl, wget, chmod +x
  • Low: ls, cat, echo, git status

Sandbox Isolation

Tools execute within configured sandbox backend:
Sandbox blocks:
  • Network access (unless allowed)
  • Filesystem access outside workspace
  • Subprocess spawning (unless allowed)
  • Syscall filtering (landlock)

Configuration

Enable/Disable Tools

Tool Limits

Tool Implementation Guide

Minimal Tool

Register Tool

Add to src/tools/root.zig:

Memory Tools Deep Dive

memory_store

Saves structured knowledge:
Categories:
  • core — long-term facts
  • daily — today’s context
  • conversation — session-specific
  • Custom categories (e.g., "project_alpha")

memory_recall

Hybrid search (FTS5 + vector similarity):
Returns scored results:
Vector search requires embedding provider configuration. Falls back to keyword-only (FTS5) if disabled.

Web Search Providers

The web_search tool supports multiple providers: Configuration:
Env vars: BRAVE_API_KEY, JINA_API_KEY, etc.

Hardware Tools (IoT)

Supported Boards

  • Arduino (Uno, Mega, Nano)
  • Raspberry Pi (all models, GPIO via sysfs)
  • STM32/Nucleo (via probe-rs)
  • ESP32 (via serial)

Example: Read I2C Sensor

Returns raw byte value from register.

Next Steps

Configuration

Full tool configuration reference

Security

Learn about tool security policies