Skip to main content
Glama

Read or clear cookies

cookies

Retrieve or delete a tab's stored session data, including HTTP-only values, to inspect active sessions or clear domain-specific or all browser state.

Instructions

Get or clear cookies for the tab (CDP). 'get' returns the tab's cookies including values — incl. httpOnly that page JS can't read (group-gated). 'clear' deletes all of the tab's cookies, or only those whose domain matches domain; pass domain='*' to clear ALL browser 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": {
      "tabId": "<tabId>",
      "action": "<action>"
    },
    "name": "cookies"
  }
}

Input Schema

NameRequiredDescriptionDefault
tabIdYesTarget tab ID (must be in the MCP group)
actionYesget or clear
domainNoLimit clear to this domain, or '*' for all browser cookies

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.24.1

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the burden and mostly does: it discloses that 'get' surfaces httpOnly cookies invisible to page JS, that access is 'group-gated', and that 'clear' with domain='*' destroys ALL browser cookies — a meaningful destructive-scope warning. It does not state whether clearing is reversible or what auth/group membership checks fail with.

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?

Two sentences, front-loaded with the resource and action pair before the qualifiers. The nested parentheticals ('incl. httpOnly that page JS can't read (group-gated)') are dense but each clause carries real information.

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

Completeness4/5

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

For a 3-parameter tool with no annotations and no output schema, the description covers both modes, the destructive blast radius, and the domain override. The main remaining gap is the shape of the returned cookie data for 'get', which an agent may need to plan around.

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 coverage is 100%, so all three parameters are already documented in structured form; the description mostly restates them. It does add one useful detail the schema omits — that omitting 'domain' clears all of the tab's cookies — but that is marginal value over a fully described 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 pair and resource ('Get or clear cookies for the tab (CDP)') and immediately differentiates the two modes: 'get' returns cookie values, 'clear' deletes them. No sibling tool in the list handles cookies, so the scope is unambiguous.

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

Usage Guidelines4/5

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

The two actions are spelled out with their selection criteria: use 'get' to read values, use 'clear' to delete, and pass domain='*' when the intent is browser-wide rather than tab-scoped. It gives clear context but names no exclusions or alternative tools (e.g., reading cookies via javascript_tool).

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