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.
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
| Group | local, on by default |
| Tier | See |
| Needs | a live dev or start session |
| Read only | yes |
| Destructive | no |
| Idempotent | yes |
| Reaches the open web | no |
Inputs
| Input | Type | Required | Default | What it does |
|---|---|---|---|---|
projectPath | string | yes | Extension project root (needs a live dev session) | |
browser | string | no | Which 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. |
context | array of "background" | "content" | "sidebar" | "popup" | "options" | "devtools" | "newtab" | "history" | "bookmarks" | no | Restrict to these contexts. Omit for all. | |
signalsOnly | boolean | no | false | Only structured dx.signal diagnostics (code/status/remediation), no plain console lines. |
since | number | no | Only events with seq greater than this; the cursor for polling forward. | |
url | string | no | Only events whose url/hostname matches (glob or substring), e.g. https://shop.example/*. | |
tab | number | no | Only events from this tab id. | |
follow | boolean | no | false | Collect from the live control channel for a bounded window instead of reading the file. |
followMs | number | no | 4000 | How long to collect live frames when follow=true (clamped 500–15000ms). |
limit | number | no | 200 | How many of the most recent events to return. |
When it fails
- The call is refused because no session is live. Start one with
extension_devorextension_startand call again.
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 andtabUrlresolution...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.