Skip to main content
Glama
Playwright DevTools MCP Server

Playwright DevTools MCP Server

by ariangibson

storage_clear_data

Clear localStorage, sessionStorage, or cookies for a browser context by type, with optional domain targeting for cookies, to reset state between test runs.

Instructions

Clear browser storage data by type (localStorage, sessionStorage, cookies)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "contextId": "<contextId>"
    },
    "name": "storage_clear_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
typesNoTypes of storage to clear
contextIdYesBrowser context ID from browser_launch
cookieDomainNoSpecific domain for cookie clearing (optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full disclosure burden for a destructive operation, and it does not say that data is permanently removed, which context/page is affected, or that the default clears everything ('all'). It also omits that clearing cookies can log the session out.

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

Conciseness4/5

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

A single front-loaded sentence with no wasted words. It is efficient, though it is arguably too short for a destructive tool rather than padded.

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

Completeness2/5

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

For a destructive, context-scoped tool with no annotations and no output schema, the description leaves out the required contextId relationship, the default 'all' scope, and the irreversibility of the action. An agent would have to infer the blast radius from the schema alone.

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?

Schema description coverage is 100%, so the schema already documents types, contextId, and cookieDomain, making the description's type enumeration largely redundant. The baseline of 3 applies; nothing here adds meaning beyond the schema.

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?

States a specific verb (Clear) and resource (browser storage data) and enumerates the types it covers, which distinguishes it from the read siblings like storage_get_cookies and storage_get_local_storage. It does not explicitly name those siblings, but the verb alone makes the distinction clear.

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 guidance on when to use this tool versus the getter siblings, no note on prerequisites (e.g., an active browser context from browser_launch), and no statement about when-not to use it. The only usage signal is the word 'Clear' and the type list.

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