Skip to content

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.

Quick start ​

Show me every log line since the session started, in order

Asked for every log line, the agent runs the extension and reads the session log in order.

Asked for every log line, the agent runs the extension and reads the session log in order.

How the agent uses it ​

This reads the same agent-bridge plane as the extension logs CLI: a one-shot returns the most recent matching lines from logs.ndjson, and follow:true connects to the live control channel, receives the broker's replay of its recent ring (up to 5,000 events, counted in value.replayed) and then the frames that arrive during followMs (value.live). This requires an active extension_dev 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 onlyyes
Destructiveno
Idempotentyes
Reaches the open webno

Inputs ​

InputTypeRequiredDefaultWhat it does
projectPathstringyesExtension project root (needs a live dev session)
browserstringnoWhich dist/extension-js/<browser>/ to read. Defaults to this project's live session, else chrome.
level"off" | "error" | "warn" | "info" | "debug" | "trace" | "all"no"all"Minimum severity; a level includes everything more severe.
contextarray of "background" | "content" | "sidebar" | "popup" | "options" | "devtools" | "newtab" | "history" | "bookmarks"noRestrict to these contexts. Omit for all.
signalsOnlybooleannofalseOnly structured dx.signal diagnostics (code/status/remediation), no plain console lines.
sincenumbernoOnly events with seq greater than this; the cursor for polling forward.
urlstringnoOnly events whose url/hostname matches (glob or substring), e.g. https://shop.example/*.
tabnumbernoOnly events from this tab id.
followbooleannofalseCollect from the live control channel for a bounded window instead of reading the file.
followMsnumberno4000How long to collect live frames when follow=true (clamped 500–15000ms).
limitnumberno200How many of the most recent events to return.

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_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 ro...
  • extension_list_extensions: List the extensions in the running dev browser: id, name, version, and, on Chromium, live contexts.
  • extension_manifest_validate: Validate a manifest.json across browsers.
  • extension_theme_verify: Verify a Chrome theme manifest before it ships.