Welcome to Raspberry Pi 5 repository
05. OpenClaw Tools Introduction
Tools
OpenClaw exposes first-class agent tools for browser, canvas, nodes, and cron. These tools replace the old openclaw-* Skills: tools are typed, don't require shell calls, and agents should depend on them directly.
Disabling Tools
You can globally allow/deny tools via tools.allow / tools.deny in openclaw.json (deny takes precedence). This blocks disallowed tools from being sent to the model provider.
{ tools: { deny: ["browser"] },}Note:
- Matching is case-insensitive.
- Supports
*wildcard ("*"for all tools). - If
tools.allowonly references unknown or unloaded plugin tool names, OpenClaw will log a warning and ignore the allow list to ensure core tools remain available.
Tool Profiles (Base Allow Lists)
tools.profile sets a base tool allow list before tools.allow/tools.deny. Overridable per agent: agents.list[].tools.profile. Profiles:
minimal: Onlysession_statuscoding:group:fs,group:runtime,group:sessions,group:memory,imagemessaging:group:messaging,sessions_list,sessions_history,sessions_send,session_statusfull: Unrestricted (same as unset)
Example (messaging by default, also allow Slack + Discord tools):
xxxxxxxxxx{ tools: { profile: "messaging", allow: ["slack", "discord"], },}Example (coding profile, but deny exec/process everywhere):
xxxxxxxxxx{ tools: { profile: "coding", deny: ["group:runtime"], },}Example (global coding profile, messaging-only support agent):
xxxxxxxxxx{ tools: { profile: "coding" }, agents: { list: [ { id: "support", tools: { profile: "messaging", allow: ["slack"] }, }, ], },}Provider-Specific Tool Policies
Use tools.byProvider to further restrict tools for specific providers (or individual provider/model) without changing your global defaults. Overridable per agent: agents.list[].tools.byProvider. This applies after base tool profiles and before allow/deny lists, so it can only narrow the tool set. Provider keys accept provider (e.g., google-antigravity) or provider/model (e.g., openai/gpt-5.2). Example (keep global coding profile, but Google Antigravity uses minimal tools):
xxxxxxxxxx{ tools: { profile: "coding", byProvider: { "google-antigravity": { profile: "minimal" }, }, },}Example (provider/model-specific allow list for unstable endpoints):
xxxxxxxxxx{ tools: { allow: ["group:fs", "group:runtime", "sessions_list"], byProvider: { "openai/gpt-5.2": { allow: ["group:fs", "sessions_list"] }, }, },}Example (agent-specific override for a single provider):
xxxxxxxxxx{ agents: { list: [ { id: "support", tools: { byProvider: { "google-antigravity": { allow: ["message", "sessions_list"] }, }, }, }, ], },}Tool Groups (Shorthands)
Tool policies (global, agent, sandbox) support group:* entries, which expand to multiple tools. Use these in tools.allow / tools.deny. Available groups:
group:runtime:exec,bash,processgroup:fs:read,write,edit,apply_patchgroup:sessions:sessions_list,sessions_history,sessions_send,sessions_spawn,session_statusgroup:memory:memory_search,memory_getgroup:web:web_search,web_fetchgroup:ui:browser,canvasgroup:automation:cron,gatewaygroup:messaging:messagegroup:nodes:nodesgroup:openclaw: All built-in OpenClaw tools (excluding provider plugins)
Example (allow only file tools + browser):
xxxxxxxxxx{ tools: { allow: ["group:fs", "browser"], },}Plugins + Tools
Plugins can register additional tools (and CLI commands) beyond the core set. See Plugins for installation + configuration, and Skills for how tool usage guidance is injected into prompts. Some plugins ship their own Skills with tools (e.g., voice-call plugin). Optional plugin tools:
- Lobster: Typed workflow runtime with resumable approvals (requires Lobster CLI on Gateway host).
- LLM Task: JSON-only LLM step for structured workflow output (optional schema validation).
Tool Inventory
apply_patch
Apply structured patches across one or more files. For multi-chunk edits. Experimental: enable via tools.exec.applyPatch.enabled (OpenAI models only).
exec
Run shell commands in the workspace. Core parameters:
command(required)yieldMs(auto-background after timeout, default 10000)background(immediate background)timeout(seconds; kill if exceeded, default 1800)elevated(boolean; run on host if elevation mode enabled/allowed; only changes behavior when agent is sandboxed)host(sandbox|gateway|node)security(deny|allowlist|full)ask(off|on-miss|always)node(node id/name whenhost=node)- Need a real TTY? Set
pty: true.
Note:
- Returns
status: "running"withsessionIdwhen backgrounded. - Use
processto poll/log/write/kill/clear background sessions. - If
processis not allowed,execruns synchronously and ignoresyieldMs/background. elevatedis gated bytools.elevatedplus anyagents.list[].tools.elevatedoverrides (both must allow), alias forhost=gateway+security=full.elevatedonly changes behavior when agent is sandboxed (otherwise no-op).host=nodecan target macOS companion app or headless node hosts (openclaw node run).- Gateway/node approvals and allowlists: Execution Approvals.
process
Manage background exec sessions. Core operations:
list,poll,log,write,kill,clear,remove
Note:
pollreturns new output, exit status when complete.logsupports line-basedoffset/limit(omitoffsetfor last N lines).processis scoped per agent; sessions from other agents are not visible.
web_search
Search the web using Brave Search API. Core parameters:
query(required)count(1-10; default fromtools.web.search.maxResults)
Note:
- Requires Brave API key (recommended:
openclaw configure --section web, or setBRAVE_API_KEY). - Enable via
tools.web.search.enabled. - Responses are cached (default 15 minutes).
- See Web Tools for setup.
web_fetch
Fetch and extract readable content from URL (HTML → markdown/text). Core parameters:
url(required)extractMode(markdown|text)maxChars(truncate long pages)
Note:
- Enable via
tools.web.fetch.enabled. - Responses are cached (default 15 minutes).
- For JS-heavy sites, prefer browser tool.
- See Web Tools for setup.
- See Firecrawl for optional anti-bot fallback.
browser
Control dedicated OpenClaw-managed browser. Core operations:
status,start,stop,tabs,open,focus,closesnapshot(aria/ai)screenshot(returns image block +MEDIA:<path>)act(UI actions: click/type/press/hover/drag/select/fill/resize/wait/evaluate)navigate,console,pdf,upload,dialog
Profile management:
profiles— list all browser profiles with their statuscreate-profile— create new profile with auto-assigned port (orcdpUrl)delete-profile— stop browser, delete user data, remove from config (local only)reset-profile— kill orphaned processes on profile port (local only)
Common parameters:
profile(optional; defaults tobrowser.defaultProfile)target(sandbox|host|node)node(optional; pin specific node id/name)
Note:
- Requires
browser.enabled=true(defaulttrue; setfalseto disable). - All operations accept optional
profileparameter for multi-instance support. - When
profileis omitted, usesbrowser.defaultProfile(default "chrome"). - Profile names: lowercase alphanumeric + hyphens only (max 64 chars).
- Port range: 18800-18899 (max ~100 profiles).
- Remote profiles support attach only (no start/stop/reset).
- If a browser-capable node is connected, tool may auto-route to it (unless you pin
target). snapshotdefaults toaiwhen Playwright installed; useariafor accessibility tree.snapshotalso supports role snapshot options (interactive,compact,depth,selector), returning refs likee12.actneedsreffromsnapshot(number12in AI snapshot, ore12in role snapshot); useevaluatefor rare CSS selector needs.- Avoid
act→waitby default; only use in special cases (no reliable UI state to wait for). uploadcan optionally passrefto auto-click after ready.uploadalso supportsinputRef(aria ref) orelement(CSS selector) to set<input type="file">directly.
canvas
Drive Node Canvas (present, eval, snapshot, A2UI). Core operations:
present,hide,navigate,evalsnapshot(returns image block +MEDIA:<path>)a2ui_push,a2ui_reset
Note:
- Uses Gateway
node.invokeunder the hood. - If
nodenot provided, tool picks default (single connected node or local mac node). - A2UI is v0.8 only (no
createSurface); CLI will reject v0.9 JSONL with line error. - Quick smoke test:
openclaw nodes canvas a2ui push --node <id> --text "Hello from A2UI".
nodes
Discover and locate paired nodes; send notifications; capture camera/screen. Core operations:
status,describepending,approve,reject(pairing)notify(macOSsystem.notify)run(macOSsystem.run)camera_snap,camera_clip,screen_recordlocation_get
Note:
- Camera/screen commands require node app in foreground.
- Images return image block +
MEDIA:<path>. - Video returns
FILE:<path>(mp4). - Location returns JSON payload (lat/lon/accuracy/timestamp).
runparameters:commandargv array; optionalcwd,env(KEY=VAL),commandTimeoutMs,invokeTimeoutMs,needsScreenRecording.
Example (run):
xxxxxxxxxx{ "action": "run", "node": "office-mac", "command": ["echo", "Hello"], "env": ["FOO=bar"], "commandTimeoutMs": 12000, "invokeTimeoutMs": 45000, "needsScreenRecording": false}image
Analyze images using configured image model. Core parameters:
image(required path or URL)prompt(optional; defaults to "Describe the image.")model(optional override)maxBytesMb(optional size limit)
Note:
- Available only when
agents.defaults.imageModelis configured (primary or fallback), or when an implicit image model can be inferred from your default model + configured auth (best-effort pairing). - Uses image model directly (independent of main chat model).
message
Send messages and channel operations across Discord/Google Chat/Slack/Telegram/WhatsApp/Signal/iMessage/MS Teams. Core operations:
send(text + optional media; MS Teams also supportscardfor Adaptive Cards)poll(WhatsApp/Discord/MS Teams polls)react/reactions/read/edit/deletepin/unpin/list-pinspermissionsthread-create/thread-list/thread-replysearchstickermember-info/role-infoemoji-list/emoji-upload/sticker-uploadrole-add/role-removechannel-info/channel-listvoice-statusevent-list/event-createtimeout/kick/ban
Note:
sendroutes WhatsApp via Gateway; other channels send directly.polluses Gateway for WhatsApp and MS Teams; Discord polls send directly.- When message tool call is bound to active chat session, sending is constrained to that session's targets to avoid cross-context leakage.
cron
Manage Gateway scheduled tasks and wakeups. Core operations:
status,listadd,update,remove,run,runswake(enqueue system event + optional immediate heartbeat)
Note:
addexpects full cron object (same schema ascron.addRPC).updateuses{ id, patch }.
gateway
Restart or apply updates to running Gateway process (in-place). Core operations:
restart(authorize + sendSIGUSR1for in-process restart;openclaw gatewayin-place restart)config.get/config.schemaconfig.apply(validate + write config + restart + wake)config.patch(merge partial update + restart + wake)update.run(run update + restart + wake)
Note:
- Use
delayMs(default 2000) to avoid interrupting in-progress replies. restartdisabled by default; enable withcommands.restart: true.
sessions_list / sessions_history / sessions_send / sessions_spawn / session_status
List sessions, check transcript history, or send to another session. Core parameters:
sessions_list:kinds?,limit?,activeMinutes?,messageLimit?(0 = none)sessions_history:sessionKey(orsessionId),limit?,includeTools?sessions_send:sessionKey(orsessionId),message,timeoutSeconds?(0 = fire-and-forget)sessions_spawn:task,label?,agentId?,model?,runTimeoutSeconds?,cleanup?session_status:sessionKey?(default current; acceptssessionId),model?(defaultclears override)
Note:
mainis canonical private chat key; global/unknown are hidden.messageLimit > 0gets last N messages per session (tool messages filtered).- When
timeoutSeconds > 0,sessions_sendwaits for final completion. - Delivery/announcement happens after completion, best-effort;
status: "ok"confirms agent run completed, not announcement delivered. sessions_spawnstarts sub-agent run and sends announcement reply back to requester chat.sessions_spawnis non-blocking, returnsstatus: "accepted"immediately.sessions_sendruns reply ping-pong (replyREPLY_SKIPto stop; max rounds viasession.agentToAgent.maxPingPongTurns, 0-5).- After ping-pong, target agent runs an announcement step; reply
ANNOUNCE_SKIPto suppress announcement.
agents_list
List agent ids that current session can target with sessions_spawn. Note:
- Results are limited by per-agent allowlists (
agents.list[].subagents.allowAgents). - When configured as
["*"], tool includes all configured agents and marksallowAny: true.
Parameters (Common)
Gateway-supported tools (canvas, nodes, cron):
gatewayUrl(defaultws://127.0.0.1:18789)gatewayToken(if auth enabled)timeoutMs
Browser tool:
profile(optional; defaults tobrowser.defaultProfile)target(sandbox|host|node)node(optional; pin specific node id/name)
Recommended Agent Flows
Browser automation:
browser→status/startsnapshot(ai or aria)act(click/type/press)screenshotif you need visual confirmation
Canvas rendering:
canvas→presenta2ui_push(optional)snapshot
Node targeting:
nodes→statusdescribeon selected nodenotify/run/camera_snap/screen_record
Security
- Avoid direct
system.run; only usenodes→runwith explicit user consent. - Respect user consent for camera/screen capture.
- Use
status/describebefore calling media commands to ensure permissions.
How Tools Are Presented to Agents
Tools are exposed through two parallel channels:
- System prompt text: Human-readable list + guidance.
- Tool schemas: Structured function definitions sent to model API.
This means agents see both "what tools exist" and "how to call them". If a tool doesn't appear in the system prompt or schema, the model cannot invoke it.
For more tool introduction content, refer to: Tools - OpenClaw