Skip to main content
Glama

browser_get_cookies

Read-onlyIdempotent

Lists cookie metadata (name, domain, path, expiry, flags) for a browser tab or URLs, excluding values by default; optionally includes values only for local development origins.

Instructions

Lists the cookies of the tab (or of urls) via CDP Network.getCookies: name, domain, path, expiry, httpOnly, secure, sameSite. Never their values by default (session secrets).

include_values=True: values included ONLY for a local development origin (localhost, 127.0.0.1, [::1], *.localhost, *.test: the tab, or each of the urls) and only for cookies of those domains; clear refusal for any other origin. An action, not a read: refused during the emergency stop and never retried automatically.

Input Schema

NameRequiredDescriptionDefault
urlsNo
tab_idYesYour tab's id (from browser_new_tab, or a tab adopted with browser_adopt_tab).
include_valuesNo

Output Schema

NameRequiredDescriptionDefault
dataYes
statusYes
warningNoEmergency stop hotkey not held, or similar notice
untrusted_noteNoPage text that looks like instructions aimed at an AI

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv2.31.6
    • addedOutput schema / $defs
      Added value: +{
      +  "Cookie": {
      +    "additionalProperties": true,
      +    "description": "Cookie. value only for a local development domain, when asked (include_values).",
      +    "properties": {
      +      "domain": {
      +        "type": "string"
      +      },
      +      "expires": {
      +        "type": "number"
      +      },
      +      "httpOnly": {
      +        "type": "boolean"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "path": {
      +        "type": "string"
      +      },
      +      "sameSite": {
      +        "type": "string"
      +      },
      +      "secure": {
      +        "type": "boolean"
      +      },
      +      "value": {
      +        "type": "string"
      +      }
      +    },
      +    "title": "Cookie",
      +    "type": "object"
      +  },
      +  "Cookies": {
      +    "additionalProperties": true,
      +    "properties": {
      +      "cookieCount": {
      +        "type": "integer"
      +      },
      +      "cookies": {
      +        "items": {
      +          "$ref": "#/$defs/Cookie"
      +        },
      +        "type": "array"
      +      },
      +      "dialog": {
      +        "$ref": "#/$defs/PageDialog"
      +      },
      +      "dialogOpened": {
      +        "type": "boolean"
      +      },
      +      "message": {
      +        "type": "string"
      +      },
      +      "pendingDialogs": {
      +        "items": {
      +          "$ref": "#/$defs/PageDialog"
      +        },
      +        "type": "array"
      +      },
      +      "valuesIncluded": {
      +        "type": "boolean"
      +      }
      +    },
      +    "title": "Cookies",
      +    "type": "object"
      +  },
      +  "PageDialog": {
      +    "additionalProperties": true,
      +    "description": "Dialog opened by the page (never accepted by the agent: browser_handle_dialog).",
      +    "properties": {
      +      "defaultPrompt": {
      +        "type": "string"
      +      },
      +      "message": {
      +        "type": "string"
      +      },
      +      "tabId": {
      +        "type": "integer"
      +      },
      +      "type": {
      +        "type": "string"
      +      },
      +      "url": {
      +        "type": "string"
      +      }
      +    },
      +    "title": "PageDialog",
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / additionalProperties
      Added value: +true
    • addedOutput schema / description
      Added value: +"Cookies of the tab (values only for local dev origins)."
    • addedOutput schema / properties / data
      Added value: +{
      +  "$ref": "#/$defs/Cookies"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "title": "Result",
      -  "type": "string"
      -}
    • addedOutput schema / properties / status
      Added value: +{
      +  "const": "success",
      +  "type": "string"
      +}
    • addedOutput schema / properties / untrusted_note
      Added value: +{
      +  "description": "Page text that looks like instructions aimed at an AI",
      +  "type": "string"
      +}
    • addedOutput schema / properties / warning
      Added value: +{
      +  "description": "Emergency stop hotkey not held, or similar notice",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "status",
      +  "data"
      +]
    • changedOutput schema / title
      Previous value: -"browser_get_cookiesOutput"New value: +"CookiesAnswer"
  2. First observedv0.1.0

TDQS

A3.9/5.0
Behavior2/5

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

The disclosure of the session-secret default, the localhost/127.0.0.1/[::1]/*.test allow-list, the hard refusal for other origins, and no automatic retry is unusually rich context. However, 'An action, not a read' directly contradicts the readOnlyHint=true annotation, leaving the agent unsure whether this tool can affect page or server state.

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?

Front-loaded with purpose, then a dedicated block for include_values and a short safety note; every clause carries information. Slightly dense formatting (multi-line parenthetical) but no redundant sentences.

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?

Return values need not be described since an output schema exists, yet the field list is still given; origin restrictions, refusal behavior, and stop-gating are all covered. The only real gap is the unresolved read-vs-action classification, which matters for how an agent reasons about side effects.

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 only 33% and both 'urls' and 'include_values' are undocumented in the schema, but the description compensates: it explains exactly what include_values gates, the per-origin enforcement for each url, and that urls can scope the lookup instead of the tab. Only tab_id's provenance is left to the schema, which already covers it.

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?

Names a specific verb and resource ('Lists the cookies of the tab (or of urls) via CDP Network.getCookies') and enumerates the returned fields, which no sibling tool (browser_content, browser_eval, browser_network_requests) claims. An agent can tell immediately what this returns and where it comes from.

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?

States the default (values omitted) and the exact condition under which include_values=True is honored (local development origins only, per-tab or per-url, with a clear refusal otherwise), plus the emergency-stop gate. It stops short of naming when to prefer an alternative (e.g. browser_eval / browser_content for non-cookie data), so it is strong but not complete routing guidance.

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