Skip to main content
Glama
puppeteer-mcp-claude

puppeteer-mcp-claude

by jaenster

puppeteer_set_cookies

Sets cookies on a browser tab to establish session state or authentication before navigating or testing pages.

Instructions

Set cookies on a tab.

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": {
      "cookies": "<cookies>"
    },
    "name": "puppeteer_set_cookies"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageIdNo
cookiesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

C2.6/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, yet it does not say whether existing cookies are replaced or merged, whether cookies apply per-domain or page-wide, or what happens when pageId is omitted. Only the 'tab' scope is disclosed, which is not enough for a mutation tool.

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

Conciseness3/5

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

The single sentence is front-loaded and free of filler, but it is under-specified rather than concise. Brevity here costs more than it saves given the complexity of the cookies payload.

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

Completeness2/5

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

For a mutation tool with a structured cookie array, no annotations and no output schema, the definition is markedly incomplete. An agent cannot determine merge/replace behavior, domain matching requirements, or the pageId default from this description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for two parameters, one of which is a nested array of cookie objects with name/value required and optional domain, path, expires, secure, httpOnly and sameSite fields. The description adds nothing about the cookie object shape or about pageId semantics (target tab vs. default tab), so it fails to compensate for the coverage gap.

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?

The description names a concrete verb ('Set') and resource ('cookies') plus the scope ('on a tab'), so an agent knows the operation. It does not distinguish itself from siblings like puppeteer_get_cookies or puppeteer_delete_cookies, leaving differentiation to the name.

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?

There is no when-to-use guidance, no prerequisites (e.g. whether a page must be loaded or a domain must match), and no mention of the get/delete cookie siblings as alternatives. The agent must infer everything from the tool name.

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