browser_storage
Read and write localStorage and sessionStorage.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
sessionId | string | Yes | — | Session ID from browser_navigate |
storageType | string | Yes | — | local or session |
action | string | Yes | — | get, set, remove, or clear |
key | string | No | — | Storage key (required for get, set, remove) |
value | string | No | — | Value to store (required for set) |
Examples
Read a value
Get the "user_preferences" key from localStorageSet a value
Set localStorage key "theme" to "dark"Get all storage
Show me everything in localStorageClear storage
Clear all sessionStorage dataNotes
getwithout a key returns all key-value pairsgetwith a key returns that specific valuesetcreates or updates a key-value pairremovedeletes a specific keyclearremoves all entries from the specified storage type- Useful for testing feature flags, user preferences, and cached state