extension_storage
Read or write one chrome.storage key from the background, over the control channel.
Quick start
Read chrome.storage.local and set settings.theme to dark
Asked to set a storage key, the agent writes it through the control channel and reads it back.
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 | Act |
| Needs | a dev session, which carries control unless started with allowControl: false |
| Read only | no |
| Destructive | yes |
| Idempotent | no |
| 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 | |
action | "get" | "set" | yes | get reads a key or the whole area; set writes one. | |
area | "local" | "sync" | "session" | "managed" | no | "local" | chrome.storage area. |
key | string | no | Key to get or set. | |
value | any | no | Value to set; for null or "" use valueJson. | |
valueJson | string | no | Value as JSON text; not with value. | |
browser | string | no | Session browser; required when several run. | |
timeout | number | no | Timeout ms (default 30000; Firefox 10000; debug port 15000). |
When it fails
- The call is refused because no session is live. Start one with
extension_devorextension_startand call again. - The control channel is off. The session was started with
allowControl: false. Start it again without that flag.
Next
- MCP server: install, the two 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 or a shortcut, over the control channel (by hand: --allow-control).extension_reload: Reload the extension's background, or a tab, over the control channel (allowControl); a background reload waits up to 5 s.