Skip to main content
Glama

Robot Actions — Remote Device Control

Webpage clear browsing data

webpage_clear_browsing_data
DestructiveIdempotent

Clear cookies, localStorage, sessionStorage and/or the Cache Storage API for the page in the device browser (iOS Safari or Android Chrome, auto-detected). USE THIS to get a genuinely clean session between test cases: webpage_reload deliberately PRESERVES localStorage, so a reload keeps you logged in and carries app state into the next case. Every scope is VERIFIED by re-reading it afterwards and the result reports before/after counts, so a scope that could not be cleared says so instead of being assumed. On iOS cookies are removed one at a time through the Web Inspector (Page.deleteCookie), which reaches HttpOnly cookies that document.cookie cannot; on Android Network.clearBrowserCookies clears them in one call. HTTP cache: Android clears it via Network.clearBrowserCache (the browser reports no count, so it is returned as issued rather than verified); iOS has no Web Inspector equivalent, so only the Cache Storage API is cleared there and the HTTP cache is reported unsupported rather than silently skipped. DOES NOT LOG YOU OUT OF HTTP BASIC AUTH. Those credentials live in the browser credential store, which is none of these scopes — verified on qa.tms-hmpu.com, where an authenticated session shows 0 cookies, 0 localStorage and 0 sessionStorage. To force a Basic-auth challenge again, terminate the browser (ios_terminate_app com.apple.mobilesafari) and navigate afresh.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidYesDevice UDID / serial (iOS or Android)
pageIdNoTarget page/tab id — auto-picked when omitted
scopesNoWhat to clear (default: ["all"]). "all" = every scope this platform supports.
socketNoAndroid only: abstract unix socket name (default: chrome_devtools_remote)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations cover the safety profile (destructiveHint true, idempotent, openWorld), and the description adds substantial context beyond them: per-scope verification by re-reading with before/after counts, platform-specific mechanisms (Page.deleteCookie one-at-a-time on iOS reaching HttpOnly cookies vs Network.clearBrowserCookies on Android), HTTP cache cleared only on Android with iOS reported unsupported rather than silently skipped, and the Basic-auth credential-store caveat with real evidence.

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 core action and the reload contrast are front-loaded, and despite its length every sentence carries distinct operational value (verification semantics, platform differences, unsupported cases, auth caveat). It is dense rather than padded, though the volume of detail is close to the ceiling for a tool description.

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?

This is a destructive, cross-platform tool with no output schema, yet the description explains the return shape (before/after counts, unsupported scopes reported), platform behavior differences, and a non-obvious limitation about Basic auth. An agent has everything needed to invoke and interpret it correctly.

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% and every parameter (udid, pageId, scopes, socket) is already documented in-schema, so the baseline is 3. The description reinforces scopes ('every scope is VERIFIED') and the default-all behavior but adds no enum or format detail beyond the schema.

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?

States a specific verb (Clear) plus the exact scopes it operates on (cookies, localStorage, sessionStorage, Cache Storage API) scoped to 'the page in the device browser'. It names platforms and auto-detection, and implicitly differentiates itself from the narrower sibling webpage_clear_cookies. An agent can identify the resource and action without opening the schema.

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?

Gives an explicit when-to-use ('get a genuinely clean session between test cases') and names the alternative it is contrasted with: webpage_reload, which deliberately PRESERVES localStorage and keeps you logged in. It also states a critical boundary — it does NOT log out of HTTP Basic auth — and tells the agent the workaround (terminate Safari and navigate afresh).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources