Skip to main content
Glama

Robot Actions — Remote Device Control

Webpage clear cookies

webpage_clear_cookies
DestructiveIdempotent

Expire all NON-HttpOnly cookies visible to the current page origin in the device browser (iOS Safari or Android Chrome, auto-detected), via document.cookie. PREFER webpage_clear_browsing_data: it reaches HttpOnly cookies (which this cannot — and a session cookie is usually exactly the HttpOnly one you wanted gone), verifies the result by re-reading the cookie jar, and can clear localStorage/sessionStorage/caches in the same call. This tool remains for callers that specifically want the document.cookie behaviour. Returns { cleared } — the count of cookies expired, NOT verified afterwards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidYesDevice UDID / serial (iOS or Android)
pageIdNoTarget page/tab id — auto-picked when omitted
socketNoAndroid only: abstract unix socket name (default: chrome_devtools_remote)
platformVersionNoIgnored (kept for compatibility)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and idempotentHint=true but say nothing about coverage limits. The description adds the crucial behavioral facts: HttpOnly cookies are out of reach, the result is not verified afterward, and 'cleared' is a count rather than a confirmation. It even warns that the session cookie you likely want gone is usually the HttpOnly one.

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?

Scope and the primary recommendation are front-loaded, and every sentence contributes routing or behavioral information. The parenthetical aside about session cookies is slightly editorial and the sentence runs long, but it adds real decision value rather than filler.

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?

For a destructive, unverifiable, domain-scoped operation with no output schema, the description covers the return shape ({ cleared } with its count-not-verification caveat), the platform auto-detection, and the limitation set. Nothing an agent needs to call it correctly is missing.

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% (udid, pageId, socket, platformVersion all documented), so the schema carries parameter semantics; the description adds no param-level detail beyond implying page-origin scoping via pageId. Baseline 3 is appropriate when the schema does the heavy lifting.

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 precise verb (expire), the exact resource subset (NON-HttpOnly cookies), the scope (current page origin), the platforms (iOS Safari / Android Chrome, auto-detected), and the mechanism (document.cookie). It explicitly positions itself against the sibling webpage_clear_browsing_data, so an agent can distinguish the two without opening either 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 directive ('PREFER webpage_clear_browsing_data') with three concrete reasons (reaches HttpOnly, verifies the jar, clears storage/caches) and then states the narrow condition under which this tool is still the right choice. When/when-not/alternative are all present.

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