Skip to main content
Glama

manage_cookies

Inspect, edit, delete, clear, and assert browser cookies at the Playwright context layer, including httpOnly cookies, to test Chrome extension behavior without relying on declared permissions.

Instructions

Inspect, edit, delete, and assert browser cookies at the Playwright context layer. Works regardless of the extension's declared permissions and can read httpOnly cookies. Restrictions in connect_browser (CDP) mode, where cookies belong to the user's real profile: 'clear' is disabled, 'delete' requires a cookie 'name', 'get' requires a 'url' or 'name' scope, 'set' won't replace an existing cookie unless overwrite is true, and cookie values are redacted unless include_values is true.

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": {
      "action": "<action>"
    },
    "name": "manage_cookies"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoFor 'get'/'assert': only consider cookies that would be sent to this URL. For 'set': the cookie's URL (alternative to domain+path).
nameNoCookie name. Filters 'get'; targets 'delete'; required for 'assert'.
pathNoExact cookie path. Filters 'delete'; disambiguates 'assert' when one cookie name exists at several paths on a domain (e.g. '/' and '/admin').
actionYesget: list cookies; set: add/update a cookie; delete: remove cookies matching a filter; clear: remove ALL cookies (load_extension mode only); assert: PASS/FAIL on a cookie's existence/value
cookieNoFull cookie object for 'set': { name, value, url | (domain & path), expires?, httpOnly?, secure?, sameSite? }. sameSite is Strict|Lax|None; expires is unix seconds.
domainNoDomain filter for 'delete'; optional disambiguator for 'assert'. A leading dot is ignored on both sides, so 'example.com' matches a cookie stored as '.example.com'. 'delete' matches the domain exactly (after dot-stripping) so it never reaches subdomains; 'assert' also accepts a parent domain-cookie that would be sent to the domain you name.
overwriteNoFor 'set' in connect_browser mode: allow replacing a cookie that already exists on that domain/path. Off by default, because overwriting a real profile's session cookie can log you out or corrupt a live session. Ignored in load_extension mode, where writes are always allowed.
expected_valueNoFor 'assert': expected cookie value. Omit to assert mere existence.
include_valuesNoFor 'get' and 'assert' in connect_browser mode: show real cookie values instead of redacting them. Off by default so session tokens from the user's real profile aren't exposed. Ignored in load_extension mode, where values are always shown.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.4.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses permission independence, httpOnly readability, per-action degradation in CDP mode, default redaction of cookie values, and the concrete harm of overwriting (logging out or corrupting a live session). This is exactly the behavioral context annotations would otherwise supply.

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, purpose front-loaded before the restriction list, with no filler. The second sentence is a long run-on enumeration of restrictions, which costs some scanability but every 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 9-parameter tool with a nested cookie object and no annotations or output schema, the description covers mode differences and safety defaults well. It does not describe the shape of results returned by get or what assert produces beyond the enum label, a minor gap the schema partially covers.

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% and the individual property descriptions already spell out overwrite, include_values, domain dot-stripping, and per-action parameter requirements in more detail than the description. The description restates the mode-level contract rather than adding new per-parameter meaning, so the baseline 3 applies.

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 opening sentence names concrete verbs (Inspect, edit, delete, assert) with a concrete resource (browser cookies) and pins the layer ('Playwright context layer'). The clause about working 'regardless of the extension's declared permissions' and reading httpOnly cookies implicitly separates it from storage-level tools like extension_storage.

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 description gives explicit mode-conditional guidance: connect_browser/CDP mode imposes restrictions on clear, delete, get, set, and value visibility, while load_extension mode does not. It stops short of naming a sibling tool or stating when to prefer this over extension_storage, which keeps it from a 5.

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