extension_logs_read
Read a dev session's console from every context in one timeline, or follow:true for live lines after the replayed ones.
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
Answers past events with a seq to poll; extension_inspect and extension_dom_snapshot answer what shows now, extension_element_act acts, extension_eval runs code. Works on a npx extension dev run by hand (follow needs --allow-control there); not on extension_start.
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 | Project root of a running session: extension_dev, extension_start, or npx extension dev|start by hand | |
browser | string | no | Session browser; default the live session, else chrome. | |
level | "off" | "error" | "warn" | "info" | "debug" | "trace" | "all" | no | "all" | Minimum severity. |
context | array of "background" | "content" | "sidebar" | "popup" | "options" | "devtools" | "newtab" | "history" | "bookmarks" | no | Only these contexts. | |
signalsOnly | boolean | no | false | Only dx.signal diagnostics. |
since | number | no | Only events after this seq (the polling cursor). | |
url | string | no | Only events whose url matches (glob or substring). | |
tab | number | no | Only this tab id. | |
match | string | no | Only lines matching this regex or substring. | |
follow | boolean | no | false | Also collect live lines for followMs after the replayed ones. |
followMs | number | no | 4000 | ms to collect live frames (500 to 15000). |
limit | number | no | 200 | How many recent events. |
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 three groups and the session gates
- Install in your client
extension_analyze: Analyze a built extension in dist/<browser>: total and shippable size, entry points, permissions and store checks.extension_doctor: Diagnose a dev session leg by leg, each with its remediation.extension_dom_snapshot: Take a DOM snapshot of one open extension surface or targetId, or list what is open (listTargets on the debug port or listTabs).extension_inspect: Inspect a web page or targetId in a running session, first navigating a tab to url when given: its HTML, DOM, console and CSS selector counts, closed shadow roots too.extension_installed_read: List the extensions installed in a running session's browser, read-only; the project's own row has ownExtension:true.extension_manifest_validate: Validate manifest.json against each browser: per-browser errors, permissions the code calls but lacks, and buildBlocking errors.extension_screenshot: Take a .png of one surface, page or targetId in a live session; a closed surface is opened first, answering opened: true.extension_theme_verify: Verify a Chrome theme manifest, not an extension's: the colors Chrome paints and the keys it drops.