Tools
Browser agent tools
The agent gets one tool for browser automation:
browser- doctor/status/start/stop/tabs/open/focus/close/snapshot/screenshot/navigate/act/requests/errors/text/emulate
How it maps:
browser snapshotreturns a stable UI tree (AI or ARIA).- Snapshot
querykeeps lines containing all whitespace-separated query tokens, ignoring case. Matching lines retain element refs; the result reports the match count and respectsmaxChars. It searches the returned snapshot, so increase the snapshot scope if the source was truncated. browser requestsreads the collected network log. Optionalfiltermatches a substring in the URL or resource type;limitkeeps the most recent entries (default 50). Results reporttotalmatching collected requests andreturnedentries; the output budget may reduce that count further.clear=trueclears the entire collected log after reading, including entries omitted by filtering or limits.browser errorsreads collected page errors.limitkeeps the most recent entries (default 50). Results reporttotalcollected errors andreturnedentries; the output budget may reduce that count further.clear=trueclears the entire collected log after reading, including entries omitted by limits. Page errors remain untrusted external content.browser textextracts visible prose using the first explicitselectormatch, otherwise the firstarticle,main, orbody.maxCharsmust be positive; it defaults to and cannot exceed 40,000 characters. The tool's output budget may truncate further. Page text remains untrusted external content.browser emulateapplies one or more ofdevice(a Playwright device name),colorScheme(dark,light,no-preference, ornoneto clear),timezoneId, andlocale. Settings apply in that order and return anappliedlist; they are not atomic. These four actions support local and node targets but not Chrome MCP existing-session profiles.browser navigatealso returns the loaded page's snapshot inline (efficient interactive tier, so the payload stays compact and bounded), so the agent does not need a follow-up snapshot call. Batchactresults that report a cross-document navigation include the same fresh page state. Navigations that resolve to a download skip it.browser actuses the snapshotrefIDs to click/type/drag/select.browser screenshotcaptures pixels (full page, element, or labeled refs).- If a screenshot times out while the browser is still capturing or restoring page settings, further screenshots, resizing, and device changes on that tab return a recovery error. Retry after the capture finishes. If it stays stuck, close and reopen the affected tab; other tabs remain available.
browser doctorchecks Gateway, plugin, profile, browser, and tab readiness.browseraccepts:profileto choose a named browser profile (openclaw, chrome, or remote CDP).target(sandbox|host|node) to select where the browser lives.- In sandboxed sessions,
target: "host"requiresagents.defaults.sandbox.browser.allowHostControl=true. - If
targetis omitted: sandboxed sessions default tosandbox, non-sandbox sessions default tohost. - If a browser-capable node is connected, the tool may auto-route to it unless you pin
target="host"ortarget="node".
This keeps the agent deterministic and avoids brittle selectors.
Example agent tool arguments (reuse a targetId from tabs or open):
{ "action": "requests", "targetId": "t1", "filter": "fetch", "limit": 20, "clear": true }{ "action": "text", "targetId": "t1", "selector": "article", "maxChars": 6000 }{ "action": "snapshot", "targetId": "t1", "query": "sign in", "maxChars": 4000 }{ "action": "emulate", "targetId": "t1", "device": "iPhone 15", "colorScheme": "dark", "timezoneId": "America/New_York", "locale": "en-US"}Was this useful?