Skip to main content
Glama

storage.clear

Clears all localStorage or sessionStorage data for a browser origin. Use it to reset saved state on the active page or a specific target before rerunning a flow.

Instructions

Clear all of localStorage or sessionStorage for the origin.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "storage.clear"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNo
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false and openWorldHint=true, so the mutating nature is flagged. The description adds useful scope ('all' keys, origin-bound), but does not state that the wipe is irreversible, that IndexedDB and cookies are untouched, or whether the active page is affected. For a destructive operation with no output schema, that is a meaningful remaining gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler; the scope qualifier follows the action immediately. Nothing is wasted or redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter destructive tool with no output schema, the definition is serviceable but thin: it omits irreversibility, the effect on the currently active page, and the scope boundaries versus cookie/IndexedDB clearing. Annotations carry the safety signal, which keeps this at minimum-viable rather than inadequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description distinguishes local vs session storage, which maps to the 'kind' enum parameter, but does not state a default or the consequence of omitting it. target_id and browser_id are already documented in the schema (67% coverage), so the description adds only marginal meaning beyond structured fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb (Clear) and an explicit resource (localStorage or sessionStorage), plus the scope ('for the origin'), so an agent knows exactly what data is targeted. It does not, however, differentiate this from near-identical siblings such as storage.clear_origin, storage.remove, or storage.indexeddb.clear, leaving the agent to guess which clearing tool applies.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use or when-not-to-use guidance, and no alternative is named despite a crowded set of related clearing/removal tools. The agent must infer that this is the 'wipe everything in web storage' option rather than the cookie, IndexedDB, or selective-removal variants.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools