Skip to main content
Glama

browser_get_cookies

Retrieve cookies for a site already open in the session’s browser tabs, limited to the active domain, parent, or subdomain; navigate to the site first so cookie access can proceed.

Instructions

Get cookies for a site this session has open in one of its tabs (the site itself, a parent domain or a subdomain). Navigate to the site first - cookies for sites the session is not working on are refused.

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": {
      "domain": "<domain>"
    },
    "name": "browser_get_cookies"
  }
}

Input Schema

NameRequiredDescriptionDefault
domainYesDomain to get cookies for (e.g. ".stripe.com"). Must match a tab this session has open.
partitionNoRun this call in a partition from browser_partition (an id like "p1"). Leave it out for the default partition. An unknown or closed id is an error; the call is never sent to the default partition instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.33.0
    • addedInput schema / properties / partition
      Added value: +{
      +  "description": "Run this call in a partition from browser_partition (an id like \"p1\"). Leave it out for the default partition. An unknown or closed id is an error; the call is never sent to the default partition instead.",
      +  "type": "string"
      +}
  2. Changed1 schema field changedv1.29.1
    • changedInput schema / properties / domain / description
      Previous value: -"Domain to get cookies for (e.g. \".stripe.com\")"New value: +"Domain to get cookies for (e.g. \".stripe.com\"). Must match a tab this session has open."
  3. First observedv1.0.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden, and it does surface the key non-obvious trait: the call is refused rather than returning empty or broadening scope when no matching tab exists. It says nothing about what the returned cookies contain (values, attributes, httpOnly/secure flags) or whether the read has side effects, leaving meaningful gaps for a zero-annotation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, zero filler, with the capability stated first and the hard constraint immediately after. Nothing repeats the tool name or restates structured fields.

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

Completeness3/5

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

For a simple two-parameter read tool this covers the selection-critical facts: the prerequisite and the refusal rule. Because there is no output schema, the description should ideally sketch what comes back (cookie names/values/attributes), and it omits partition behavior entirely, so it is adequate rather than complete.

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%, so both parameters are already documented, making 3 the baseline. The description does add one genuine nuance not in the schema — that parent-domain and subdomain matches are acceptable, not just exact matches — but it says nothing about the partition parameter or how domain syntax interacts with the open tab.

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 and resource ("Get cookies") plus a precise scope — the site must be open in one of this session's tabs, either the site itself, a parent domain, or a subdomain. That scoping sentence makes it unmistakable against siblings like browser_set_cookies or browser_get_local_storage without needing to name them.

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 an explicit prerequisite ("Navigate to the site first") and an explicit failure condition (cookies for sites the session is not working on are refused), which is exactly the when/when-not context an agent needs. It stops short of naming an alternative tool for the case where the site isn't open yet (e.g. browser_navigate), so it is not a full 5.

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