Skip to main content
Glama
Playwright DevTools MCP Server

Playwright DevTools MCP Server

by ariangibson

storage_get_cookies

Retrieve cookies for the current page with domain, path, expiry, and security flags, with optional filtering by name or domain.

Instructions

Get cookies for the current page with all attributes (domain, path, expiry, security flags)

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": {
      "contextId": "<contextId>"
    },
    "name": "storage_get_cookies"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoFilter cookies by name (optional)
domainNoFilter cookies by domain (optional)
contextIdYesBrowser context ID from browser_launch

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose that all cookie attributes are returned, which is useful, but it says nothing about read-only semantics, permission or context requirements, behavior when no page is loaded or when the context ID is invalid, or result size/limits.

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?

A single front-loaded sentence with the resource first and the return payload second; no filler or redundant restatement of the name.

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 three-parameter read tool with no output schema, the description covers what is returned at a high level, which is the main thing missing. It falls short on context prerequisites and filter behavior, leaving gaps an agent would hit when the call fails or returns unexpectedly many cookies.

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 name, domain, and contextId are already documented in the schema. The description adds no filtering syntax, matching semantics (exact vs substring), or default behavior when filters are omitted, so it neither compensates nor detracts.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 scope ('for the current page') and enumerates the returned attributes (domain, path, expiry, security flags). It does not name or contrast with the closest siblings (storage_get_local_storage / storage_get_session_storage), but the resource is distinct enough that an agent can separate them.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this rather than another storage-inspection tool, and no prerequisites such as needing an active browser context or a loaded page. The 'current page' phrasing implies scope but leaves the agent to infer the conditions for calling it.

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