Welcome to RDK X5 MagicBox repository
6. OpenClaw Tool 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 invocation, 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 prevents disallowed tools from being sent to model providers.
{tools: { deny: ["browser"] },}
Notes:
- Matching is case-insensitive.
*wildcards are supported ("*"means all tools).- If
tools.allowonly references unknown or unloaded plugin tool names, OpenClaw logs a warning and ignores the allow list to ensure core tools remain available.
Tool Profile (Base Allow List)
tools.profile sets a base tool allow list before tools.allow/tools.deny. Per-agent override: 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 only by default, with Slack + Discord tools allowed):
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 single provider/model) without changing your global defaults. Per-agent override: agents.list[].tools.byProvider. This is applied after the base tool profile 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 flaky 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 (Shorthand)
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 come with their own Skills (e.g., the voice-call plugin). Optional plugin tools:
- Lobster: Typed workflow runtime with resumable approvals (requires Lobster CLI on the 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. Used for multi-block edits. Experimental: enabled 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(run immediately in background)timeout(seconds; kill process if exceeded, default 1800)elevated(boolean; if enabled/allowed elevated mode, runs on host; 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.
Notes:
- When running in background, returns
status: "running"with asessionId. - 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.elevatedoverride (both must allow), and is an alias forhost=gateway+security=full.elevatedonly changes behavior when the agent is sandboxed (otherwise a no-op).host=nodecan target macOS companion apps or headless node hosts (openclaw node run).- Gateway/node approvals and allow lists: Exec Approvals.
process
Manage background exec sessions. Core operations:
list,poll,log,write,kill,clear,remove
Notes:
pollreturns new output, and exit status when complete.logsupports line-basedoffset/limit(omitoffsetto get last N lines).processis scoped by agent; sessions from other agents are invisible.
web_search
Search the web using the Brave Search API. Core parameters:
query(required)count(1-10; default fromtools.web.search.maxResults)
Notes:
- Requires a Brave API key (recommended:
openclaw configure --section web, or setBRAVE_API_KEY). - Enabled via
tools.web.search.enabled. - Responses are cached (default 15 minutes).
- See Web Tools for setup.
web_fetch
Fetch and extract readable content from a URL (HTML → markdown/text). Core parameters:
url(required)extractMode(markdown | text)maxChars(truncate long pages)
Notes:
- Enabled via
tools.web.fetch.enabled. - Responses are cached (default 15 minutes).
- For JS-heavy websites, prefer the browser tool.
- See Web Tools for setup.
- See Firecrawl for optional anti-bot fallback.
browser
Control a dedicated OpenClaw-managed browser. Core operations:
status,start,stop,tabs,open,focus,closesnapshot(aria/ai)screenshot(returns image block +MEDIA:<path>)act(UI operations: click/type/press/hover/drag/select/fill/resize/wait/evaluate)navigate,console,pdf,upload,dialog
Profile management:
profiles— List all browser profiles and their statuscreate-profile— Create a 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; select specific node id/name)
Notes:
- Requires
browser.enabled=true(defaults totrue; set tofalseto disable). - All operations accept an optional
profileparameter for multi-instance support. - When
profileis omitted,browser.defaultProfileis used (defaults to "chrome"). - Profile names: lowercase alphanumeric + hyphen only (max 64 chars).
- Port range: 18800-18899 (approx 100 profiles max).
- Remote profiles only support attach (no start/stop/reset).
- If a browser-capable node is connected, tools may auto-route to it (unless you pinned
target). snapshotdefaults toaiwhen Playwright is installed; useariafor accessibility tree.snapshotalso supports role snapshot options (interactive,compact,depth,selector), returning refs likee12.actrequires areffromsnapshot(12from AI snapshot, ore12from role snapshot); useevaluatefor rare CSS selector needs.- Avoid
act→waitby default; use only 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 directly target<input type="file">.
canvas
Drive node Canvas (present, eval, snapshot, A2UI). Core operations:
present,hide,navigate,evalsnapshot(returns image block +MEDIA:<path>)a2ui_push,a2ui_reset
Notes:
- Internally uses Gateway
node.invoke. - If no
nodeis provided, the tool picks a default (single connected node or local mac node). - A2UI is v0.8 only (no
createSurface); CLI rejects v0.9 JSONL with line errors. - 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
Notes:
- Camera/screen commands require the node app to be in the foreground.
- Images return image block +
MEDIA:<path>. - Videos return
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 the configured image model. Core parameters:
image(required path or URL)prompt(optional; defaults to "Describe the image.")model(optional override)maxBytesMb(optional size limit)
Notes:
- Only available when
agents.defaults.imageModelis configured (primary or fallback), or when an implicit image model can be inferred from your default model + configured credentials (best-effort pairing). - Uses image model directly (independent of the 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
Notes:
sendroutes WhatsApp through the Gateway; other channels send directly.polluses the Gateway for WhatsApp and MS Teams; Discord polls send directly.- When the message tool call is bound to an active chat session, sends are restricted to that session's target to avoid cross-context leakage.
cron
Manage Gateway scheduled tasks and wake. Core operations:
status,listadd,update,remove,run,runswake(enqueue system event + optional immediate heartbeat)
Notes:
addexpects a complete task object (same schema ascron.addRPC).updateuses{ id, patch }.
gateway
Restart or apply updates to a running Gateway process in-place. Core operations:
restart(authorize + sendSIGUSR1for in-process restart;openclaw gatewayrestarts in-place)config.get/config.schemaconfig.apply(validate + write config + restart + wake)config.patch(merge partial update + restart + wake)update.run(run update + restart + wake)
Notes:
- Use
delayMs(default 2000) to avoid interrupting in-progress replies. restartis disabled by default; enable withcommands.restart: true.
sessions_list / sessions_history / sessions_send / sessions_spawn / session_status
List sessions, check transcription 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)
Notes:
mainis the canonical private chat key; global/unknown are hidden.messageLimit > 0gets the last N messages per session (tool messages are filtered).- When
timeoutSeconds > 0,sessions_sendwaits for final completion. - Delivery/announce happens after completion, best-effort;
status: "ok"confirms the agent run completed, not that delivery succeeded. sessions_spawnstarts a child agent run and sends announce replies back to the requesting chat.sessions_spawnis non-blocking, immediately returnsstatus: "accepted".sessions_sendruns a reply round-trip ping-pong (replyREPLY_SKIPto stop; max turns viasession.agentToAgent.maxPingPongTurns, 0-5).- After ping-pong, the target agent runs an announce step; reply
ANNOUNCE_SKIPto suppress announce.
agents_list
List agent IDs that the current session can target with sessions_spawn. Notes:
- Results are limited by per-agent allow lists (
agents.list[].subagents.allowAgents). - When configured as
["*"], the tool includes all configured agents and marksallowAny: true.
Parameters (Common)
Tools supported by Gateway (canvas, nodes, cron):
gatewayUrl(defaultws://127.0.0.1:18789)gatewayToken(if auth is 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; usenodes→runonly with explicit user consent. - Respect user consent for camera/screen capture.
- Use
status/describeto verify permissions before calling media commands.
How Tools Are Presented to Agents
Tools are exposed via two parallel channels:
- System prompt text: Human-readable list + guidance.
- Tool schema: Structured function definitions sent to the model API.
This means the agent sees both "what tools exist" and "how to call them". If a tool does not appear in the system prompt or schema, the model cannot call it.
For more about tools, see: Tools - OpenClaw