Skip to main content
Glama

clear_site_data

DestructiveIdempotent

Clear cookies, persistent storage, and sessionStorage for the selected page's frames to create a clean replay environment for state-dependent flows. Requires confirm=true.

Instructions

Irreversibly clear browser state after confirm=true to create a clean replay environment for the selected page. Use this before replaying login, session creation, storage initialization, or other state-dependent flows; do not use it to inspect cookies or determine which response set one. For cookie provenance, including HttpOnly, Secure, and SameSite attributes, use list_network_requests with cookieName first. Cleanup covers cookies affecting the selected page's HTTP(S) frames—including HttpOnly and Secure cookies through the browser context—persistent storage for those frame origins, and each HTTP(S) frame's sessionStorage. It does not reload the page. The browser HTTP cache is global and is preserved by default; set clearBrowserCache=true only when that wider cross-page effect is explicitly intended.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNoMust be true to irreversibly delete cookies affecting the selected page's HTTP(S) frames, persistent storage for those frame origins, and HTTP(S) frame sessionStorage. This confirms state reset for replay, not inspection.
clearBrowserCacheNoAlso clear the browser-wide HTTP cache. Leave false for site-scoped replay cleanup. Setting true has a wider global effect on every page and origin in this browser, not only the selected page or its frame origins.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesWhether the tool completed successfully.
dataNoMachine-readable result payload.
toolYesStable MCP tool name.
errorNo
summaryYesConcise human-readable outcome.
Behavior5/5

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

The description details what is cleared (cookies, persistent storage, sessionStorage) and what is not (page reload, HTTP cache by default), and explains the effect of clearBrowserCache. Annotations indicate destructiveHint=true and readOnlyHint=false, which align with 'irreversibly clear'; no contradiction.

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?

The description is slightly verbose but front-loaded with the main purpose. Every sentence adds value, and the structure logically flows from purpose to usage to details.

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

Completeness5/5

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

Given the presence of an output schema (context: 'Has output schema: true'), the description does not need to explain return values. It covers purpose, usage, parameters, and behavioral details comprehensively for a complex tool.

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

Parameters4/5

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

Schema coverage is 100%, but the description adds meaning by explaining that confirm=true is required for irreversible action and that clearBrowserCache has a global effect, providing context beyond the schema descriptions.

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

Purpose5/5

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

The description clearly states the tool irreversibly clears browser state for a clean replay environment, specifying the verb ('clear') and resource ('browser state for selected page'). It distinguishes from sibling tool 'list_network_requests' for cookie inspection.

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

Usage Guidelines5/5

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

The description explicitly states when to use ('before replaying login, session creation...') and when not to use ('do not use it to inspect cookies'), and provides an alternative tool ('list_network_requests') for cookie provenance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zhizhuodemao/js-reverse-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server