Skip to main content
Glama

cookies_set

Set a cookie for an HTTP(S) URL via the browser's existing debugger permission, enabling session, authentication, or state control during live browser automation.

Instructions

Set a cookie for an HTTP(S) URL via the existing debugger permission.

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": {
      "url": "<url>",
      "name": "<name>",
      "value": "<value>"
    },
    "name": "cookies_set"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYes
nameYes
pathNo
tabIdNoOptional browser tab id to act on instead of the focused tab.
valueYes
domainNo
secureNo
expiresNo
httpOnlyNo
sameSiteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.0

TDQS

C2.9/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden, and it does disclose one genuinely useful fact: the operation depends on the existing debugger permission, which implies a permissions precondition an agent must satisfy. It does not say whether an existing cookie is overwritten, how tabId scoping interacts with the write, or what happens with expiry defaults, leaving meaningful mutation semantics undisclosed.

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?

A single front-loaded sentence with no filler, so it is appropriately sized. It is efficient but so terse that brevity shades into under-specification rather than crispness.

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 10-parameter mutation tool with no annotations and no output schema, one sentence is not sufficient. An agent can infer the basic action but lacks the cookie attribute semantics and write behavior needed to call it confidently.

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 only 10% across 10 parameters, so the description must compensate and does not. It conveys only that url is an HTTP(S) URL; path, domain, secure, httpOnly, expires, and sameSite are entirely undocumented in both schema and description, and no format or default guidance is given.

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 pairs a specific verb ("Set") with a specific resource ("a cookie") and scope ("for an HTTP(S) URL"), which cleanly separates it from cookies_get and storage_set by object type. It stops short of naming those siblings explicitly, so the differentiation is implied rather than stated.

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 guidance on when to use this versus cookies_get or storage_set, and no mention of constraints such as overwriting an existing cookie of the same name/domain/path. The only contextual hint is "via the existing debugger permission," which signals a prerequisite but not a usage decision.

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