Skip to main content
Glama

chromium-cookies

Read and write Chromium app cookies, including HttpOnly, to seed authenticated sessions before e2e tests or assert cookie state after. Set, delete, clear, or get cookies via CDP.

Instructions

Read and write cookies of a Chromium (CDP) app, HttpOnly cookies included. set needs name, value, and url or domain; delete needs name and url or domain. Use when seeding an authenticated session before an e2e test (set the session cookie, then navigate) or asserting cookie state after one. Returns { cookies, count } for get, or a small status object ({ set } / { deleted } / { cleared }) otherwise. Fails if the device is not a Chromium (CDP) device, or a param that set / delete needs is missing.

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": {
      "udid": "<udid>",
      "action": "<action>"
    },
    "name": "chromium-cookies"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoget: restrict to this URL (defaults to the active page). set/delete: scope the cookie by URL.
nameNoCookie name.
pathNoset/delete: cookie path (default /).
udidYesChromium device id from `list-devices` (e.g. `chromium-cdp-9222`).
valueNoCookie value.
actionYesget: read cookies. set: create/update a cookie. delete: remove matching cookies. clear: remove ALL browser cookies.
domainNoset/delete: scope the cookie by domain.
secureNoset: mark Secure.
expiresNoset: expiry as a Unix timestamp (seconds). Omit for a session cookie.
httpOnlyNoset: mark HttpOnly.
sameSiteNoset: SameSite policy.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / action / description
      Previous value: -"get: read cookies. set: create/update a cookie. delete: remove a named cookie. clear: remove all browser cookies."New value: +"get: read cookies. set: create/update a cookie. delete: remove matching cookies. clear: remove ALL browser cookies."
    • changedInput schema / properties / domain / description
      Previous value: -"set/delete: scope the cookie by domain (alt to url)."New value: +"set/delete: scope the cookie by domain."
    • changedInput schema / properties / name / description
      Previous value: -"set/delete: cookie name."New value: +"Cookie name."
    • changedInput schema / properties / url / description
      Previous value: -"get: restrict to these URLs (defaults to the active page). set/delete: scope the cookie by URL."New value: +"get: restrict to this URL (defaults to the active page). set/delete: scope the cookie by URL."
    • changedInput schema / properties / value / description
      Previous value: -"set: cookie value."New value: +"Cookie value."
  2. First observedv0.15.0

TDQS

A4.4/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does substantial work: it discloses the return contract for both branches ({ cookies, count } vs a status object) and the two failure modes (non-Chromium CDP device, missing required params). It stops short of flagging the blast radius of delete/clear as irreversible or noting any permission prerequisites.

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?

Purpose is front-loaded in the first sentence, followed by per-action requirements, usage, return shape, and failure conditions with no filler. Slightly dense packing of five distinct concerns, but every sentence earns its place.

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 an 11-parameter tool with no output schema and no annotations, the description covers the three things an agent most needs: action-conditional param requirements, return shape for both branches, and error conditions. Nothing essential to correct invocation is missing.

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%, so baseline is 3, but the description adds genuine cross-field semantics the schema does not encode: `set` needs name+value plus url-or-domain, `delete` needs name plus url-or-domain. That conditional requirement logic is real information beyond the flat property list.

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: "Read and write cookies of a Chromium (CDP) app," and adds the distinguishing scope note "HttpOnly cookies included." That separates it from tab-level siblings like chromium-tabs without the agent needing to open a schema.

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?

Gives concrete when-to-use scenarios: "seeding an authenticated session before an e2e test (set the session cookie, then navigate) or asserting cookie state after one." It also states action-level prerequisites. It stops short of any when-not guidance or naming an alternative mechanism for non-CDP devices beyond the failure note.

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