Skip to content

extension_element ​

Click, fill, read or wait for one element by CSS selector, or send trusted mouse and key input in an open surface, a page by url or a targetId.

Quick start ​

Click the Save button in the popup, then read the status line

How the agent uses it ​

Runs no caller code, so no allowEval; Chromium only.

Page text in the answer ​

Part of this tool's answer is text a web page or the extension wrote. The server fences it between <untrusted-data-ID> and </untrusted-data-ID> with a fresh random ID per call, named in untrusted.boundary. A fence is a signal to the model, not a gate: pair it with --no-ship when the agent reads pages you do not trust. See Server flags and telemetry.

Reference ​

Grouplocal, on by default
TierAct
Needsa live Chromium dev or start session with its debug port; no allowEval
Read onlyno
Destructiveno
Idempotentno
Reaches the open webno

Inputs ​

InputTypeRequiredDefaultWhat it does
projectPathstringyesProject root of a running session: extension_dev, extension_start, or npx extension dev|start by hand
action"click" | "fill" | "text" | "wait" | "move" | "press" | "release" | "type" | "key" | "scroll"yesclick (a real mouse press), fill, text, wait (until visible); move, press, release, type, key, scroll send trusted input.
selectorstringnoCSS selector matching exactly one element (the point for input actions; focused before type and key).
valuestringnofill: the value to set.
xnumbernopress, release, scroll: the point's x in CSS pixels of the viewport, when no selector.
ynumbernoThe point's y, with x.
pointsarray of objectnomove: the path, one trusted mousemove per point; a selector's center goes first.
button"left" | "middle" | "right"nopress, release: the mouse button (default left).
textstringnotype: the characters, one key down and up each; a newline is Enter.
keystringnokey: a key name (Enter, Escape, Tab, ArrowDown, F5) or one character.
modifiersarray of "Alt" | "Control" | "Meta" | "Shift"noModifiers held during the input.
deltaXnumbernoscroll: wheel delta in CSS pixels (positive scrolls right).
deltaYnumbernoscroll: wheel delta in CSS pixels (positive scrolls down).
context"popup" | "options" | "sidebar" | "devtools" | "newtab" | "history" | "bookmarks"noAn open surface (extension_open first).
urlstringnoA web page's tab by url.
targetIdstringnotargetId from extension_open or dom_snapshot listTargets; overrides url.
browserstringnoSession browser; required when several run.
timeoutnumbernoTimeout ms; wait polls until it (default 10000, max 30000).

When it fails ​

  • The call is refused because no session is live. Start one with extension_dev or extension_start and call again.
  • Eval is refused. Eval is the one gate that stays off. Start the session with allowEval: true on extension_dev.

Next ​

  • MCP server: install, the three groups and the session gates
  • Install in your client
  • extension_eval: Evaluate JavaScript in a running extension's background, surface, content script, page or targetId.
  • extension_open: Open an extension surface or a url, or replay the toolbar action, a context menu item or a shortcut, over the control channel (by hand: --allow-control).
  • extension_reload: Reload a live session's background, or one tab, over the control channel (allowControl) when hot reload missed an edit; answers once it is back.
  • extension_storage: Read or write one chrome.storage key from the background, over the control channel.