Skip to content

extension_inspect ​

Inspect a running extension deeply over the browser's debugger protocol: full HTML (open shadow roots of #extension-root and [data-extension-root] hosts inlined; other shadow roots are not crossed by html, dom_snapshot or probe), DOM structure, content-script injection, console messages, and CSS selector queries through probe.

Quick start ​

Read the DOM the content script injected on the cart page, shadow roots included

Asked what the content script injected, the agent runs the extension and reads the page DOM.

Asked what the content script injected, the agent runs the extension and reads the page DOM.

How the agent uses it ​

This is the ONLY tool that pierces closed shadow roots (deepDom), runs selector probes, and navigates a tab to url before reading it. It reads a web or override page and picks the first inspectable target, or the first whose url contains url; it cannot address an extension surface by name and takes no chrome.tabs id. Use extension_dom_snapshot to choose which tab or which open surface (popup, options, sidebar, devtools) to read, or to enumerate what is open. Use extension_analyze for a built extension's files and sizes on disk. Chromium rides the Chrome DevTools Protocol and needs the session's debug port, not allowControl. Firefox is fully paired: summary, meta, html, dom_snapshot, extension_roots and probes ride the agent bridge and need allowEval:true, console rides the RDP watcher replay on engine 4.0.15 and later, and deepDom needs an MV2 session with host permissions for the target url, because the Firefox MV3 background CSP blocks bridge evals. This requires an active dev or start session.

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
TierSee
Needsa live dev or start session
Read onlyno
Destructiveno
Idempotentyes
Reaches the open webno

Inputs ​

InputTypeRequiredDefaultWhat it does
projectPathstringyesExtension project root (needs a live dev session)
urlstringnoURL to inspect; the tab is navigated there first
probearray of stringnoCSS selectors to query; returns counts and samples for each
includearray of "html" | "summary" | "meta" | "dom_snapshot" | "console" | "extension_roots"no["summary","meta","console"]What to include
browserstringnoSession browser; defaults to this project's live session
maxBytesnumberno262144Truncate HTML output at this byte count (0 = unlimited)
deepDombooleannofalsePierce CLOSED shadow roots (open roots of the extension-root hosts are already inlined in html; other open roots are not read). Chromium: CDP DOM pierce. Firefox: a content-script walk via tabs.executeScript (MV2 only, needs host permissions for the target url); the answer says whether that context could see closed roots at all.

When it fails ​

Next ​

  • MCP server: install, the two groups and the session gates
  • Install in your client
  • extension_analyze: Analyze a BUILT extension on disk: file sizes, declared entry points, permissions, bundle composition, and store-readiness checks.
  • extension_doctor: Diagnose a dev session end to end: ready contract, dev-server process, control-port agreement, control channel, eval token, executor, browser liveness.
  • extension_dom_snapshot: Take a shallow structured DOM snapshot of one chosen surface through the agent bridge (localhost only; the snapshot itself needs no CDP, but listTargets and tabUrl resolution...
  • extension_list_extensions: List the extensions in the running dev browser: id, name, version, and, on Chromium, live contexts.
  • extension_logs: Read or stream logs from every context of a running dev session (service worker, content scripts, popup, options, sidebar, devtools, pages) in one ordered timeline.
  • extension_manifest_validate: Validate a manifest.json across browsers.
  • extension_theme_verify: Verify a Chrome theme manifest before it ships.