doppel
v0.7.2Drive your real, logged-in Chrome/Edge from AI agents over CDP.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
doppel_status
Check whether the Doppel browser extension is connected. Call this first if other tools error out.
doppel_snapshot
Capture a structured accessibility snapshot of the current page. Elements are tagged with a [ref] for doppel_click/doppel_type; refs stay stable across grep/offset within a snapshot. Fast: no screenshot. On dense pages (search results, shopping) use interactive:true and/or grep to cut noise, and offset to page through results.
| Parameter | Type | Description |
|---|---|---|
grep | string | Keep only elements whose printed line matches this text or regex (case-insensitive), e.g. 'Dell', 'button', or 'button "S"'. |
interactive | boolean | Only actionable elements (links/buttons/inputs); skips headings/static text/lists. Best for dense pages. |
limit | integer | Max elements to return. Default 500; 300-1000 is a good range. Prefer interactive/grep over a huge limit. |
offset | integer | Skip the first N matching elements (paginate a long page). |
within | Serialize only part of the page: a [ref] to scope to that element's subtree, or a container role like "dialog", "form", or "navigation" to scope to that region. Ignores the rest. |
doppel_scroll
Scroll an element into view by its [ref] - e.g. to scroll to the last item of a list to trigger lazy-loading / infinite scroll, then re-snapshot. The snapshot already captures the whole page (all elements, on- or off-screen) and clicks auto-scroll into view, so use this only to trigger scroll-driven loading, not to 'see more'.
| Parameter | Type | Description |
|---|---|---|
ref * | integer | The [ref] of the element to scroll into view. |
includeSnapshot | boolean | Return a fresh snapshot after scrolling. Default true. |
doppel_click
Click an element by its [ref] from the latest snapshot. Waits until it's actionable, then uses trusted native input. If you already know several actions from this snapshot, prefer doppel_batch to run them in one call.
| Parameter | Type | Description |
|---|---|---|
ref * | integer | The [ref] number from a snapshot |
includeSnapshot | boolean | Return a fresh snapshot after clicking. Default true. |
doppel_type
Type text into an element by its [ref]. Waits until actionable, focuses it, and inserts trusted text (works with React/controlled inputs).
| Parameter | Type | Description |
|---|---|---|
ref * | integer | The [ref] of the input/textarea from a snapshot |
text * | string | The text to type |
includeSnapshot | boolean | Return a fresh snapshot after typing. Default true. |
doppel_upload
Upload local file(s) to a file input WITHOUT opening the native OS file dialog. Point `ref` at the upload control from a snapshot - the file input itself, or the button/label that opens it (Doppel finds the underlying <input type=file>). `path` is an absolute path on this machine; pass an array for a multi-file input. Fires the real change event, so the page reacts exactly as if a human picked the file.
| Parameter | Type | Description |
|---|---|---|
path * | Absolute path to a local file (must be under Downloads/Documents/Desktop/Pictures/temp or $DOPPEL_UPLOAD_DIRS), or an array for a multi-file input. | |
ref * | integer | The [ref] of the upload control (the file input, or the button/label that opens it). |
includeSnapshot | boolean | Return a fresh snapshot after uploading. Default true. |
doppel_press_key
Press a special key (Enter, Tab, Backspace, Delete, Escape, Arrow keys) via trusted native input.
| Parameter | Type | Description |
|---|---|---|
key * | string | Key name, e.g. Enter, Tab, ArrowDown |
includeSnapshot | boolean | Return a fresh snapshot after the keypress. Default true. |
doppel_list_tabs
List the tabs Doppel controls (its tab group), with URLs and which is active.
doppel_new_tab
Open a new tab (background, no focus stealing) and make it active. Optionally load a URL. Pass `group` to name the tab group by the task's purpose (e.g. '27in Monitor'); tabs sharing a group cluster together.
| Parameter | Type | Description |
|---|---|---|
group | string | Short purpose label for the tab group, e.g. '27in Monitor', 'Job Apply'. Defaults to 'Doppel'. |
includeSnapshot | boolean | Return a snapshot after opening. Default true. |
url | string | URL to load. Default about:blank. |
doppel_set_group
Name the current tab's group by the task's PURPOSE (e.g. '27in Monitor', 'Job Apply'), not the site. Call this at the start of a task so the group chip reads as what you're doing instead of 'Doppel'.
| Parameter | Type | Description |
|---|---|---|
name * | string | Short purpose label, e.g. '27in Monitor'. |
doppel_select_tab
Switch the active tab to another tab Doppel controls (tabId from doppel_list_tabs).
| Parameter | Type | Description |
|---|---|---|
tabId * | integer | The tab id from doppel_list_tabs |
includeSnapshot | boolean | Return a snapshot of the newly active tab. Default true. |
doppel_close_tab
Close a tab Doppel controls and drop its session.
| Parameter | Type | Description |
|---|---|---|
tabId * | integer | The tab id from doppel_list_tabs |
doppel_cleanup_tabs
Close leftover Doppel automation tabs. By default only the generic 'Doppel' / 'Doppel Test' groups (debris from past sessions), leaving purpose-named task groups alone. Pass all:true to also close every purpose-named Doppel task group. Non-Doppel tabs and groups are never touched.
| Parameter | Type | Description |
|---|---|---|
all | boolean | Also close purpose-named Doppel task groups, not just the generic ones. |
doppel_hover
Hover the mouse over an element by its [ref] (reveals menus/tooltips). Waits until it's actionable.
| Parameter | Type | Description |
|---|---|---|
ref * | integer | The [ref] from a snapshot |
includeSnapshot | boolean | Return a fresh snapshot after hovering. Default true. |
doppel_wait_for
Wait until specific text appears on the page, or for a fixed time. Use after an action that loads content.
| Parameter | Type | Description |
|---|---|---|
includeSnapshot | boolean | Return a snapshot after waiting. Default true. |
text | string | Text to wait for (case-insensitive substring). |
timeMs | integer | Or wait a fixed number of milliseconds (max 60000). |
timeoutMs | integer | Max wait when using 'text' (default 10000). |
doppel_screenshot
Screenshot the current page (PNG by default). Returns the image. Prefer doppel_snapshot (text) when possible; use this only when you need to SEE pixels.
| Parameter | Type | Description |
|---|---|---|
format | string | Image format. Default png. |
fullPage | boolean | Capture the full scrollable page, not just the viewport. |
quality | integer | Quality 0-100 (jpeg/webp only). |
doppel_batch
Apply a SEQUENCE of actions (click/type/press_key/hover) in ONE call, in order. PREFER THIS over separate click/type calls whenever you can already see the targets in the current snapshot - e.g. filling a form, ticking several checkboxes, or 'pick an option then click Continue'. Each separate tool call costs a full model round-trip; a batch is one. Refs come from the latest snapshot, so all targets must exist on the SAME page (a batch can't span a navigation). Stops at the first failed op and reports which one. Returns one snapshot at the end.
| Parameter | Type | Description |
|---|---|---|
ops * | array | Ordered list of actions. |
includeSnapshot | boolean | Return a snapshot after the batch. Default true. |
doppel_network
See the page's network activity, captured read-only from the moment the tab attaches. Without `reqid`, returns a compact one-line-per-request list; pass `reqid` for full detail plus the response body. Successful static assets (images/fonts/scripts/css) are hidden unless `includeStatic`. Filter with `grep` (URL), `status`, `method`, `resourceType`, `failedOnly`, `xhrOnly` (just API calls), or `sinceLastAction` (only what the last click/type/navigate triggered).
| Parameter | Type | Description |
|---|---|---|
body | string | With reqid: which body to include. Default 'response'. |
failedOnly | boolean | Only failed requests (transport error or status >= 400). |
grep | string | Keep requests whose URL matches this substring or regex (case-insensitive). |
includeStatic | boolean | Include successful images/fonts/scripts/css (hidden by default). |
limit | integer | Max requests in the list. Default 50. |
maxBytes | integer | With reqid: truncate inlined bodies to N bytes (default 10000). |
method | string | HTTP method, e.g. GET, POST. |
offset | integer | Skip the first N matching requests (paginate). |
reqid | integer | Drill into one request by its [id] from the list (full detail + body). |
resourceType | string | doc | css | img | script | font | xhr | fetch | ws | media | other. |
saveToFile | string | With reqid: write the FULL response body to a file (filename only) in the Doppel captures dir (~/.doppel/captures or $DOPPEL_CAPTURE_DIR), instead of inlining it. |
sinceLastAction | boolean | Only requests triggered since the last click/type/navigate. |
status | string | Status filter: "404", "5xx", ">=400". |
xhrOnly | boolean | Only XHR/fetch requests (the API-call case). |
doppel_console
See the page's console output + JS errors, captured read-only. By default shows browser-level problems (errors, warnings, failed network/CSP/deprecation), which is fully stealthy. Page console.log/info is NOT captured unless you set `pageConsole:true`, which enables the CDP Runtime domain (detectable by a hostile page while on, so off by default; captures from that point forward). Uncaught JS exceptions are merged in as errors; consecutive duplicates collapse with [xN].
| Parameter | Type | Description |
|---|---|---|
grep | string | Keep messages whose text matches this substring or regex. |
includeStack | boolean | Include stack traces (capped ~50 frames). |
level | string | Minimum severity to show. Default 'warn' (warnings + errors + failures). |
limit | integer | Max messages. Default 50. |
offset | integer | Skip the first N matching messages (paginate). |
pageConsole | boolean | Capture page console.log/info too (enables Runtime; detectable while on). Set false to turn it back off. |