Skip to main content
Glama

browser_set_cookie_object

Set a browser cookie by supplying a cookie string, enabling authenticated sessions and stateful web tests during Selenium automation.

Instructions

Set a cookie in the browser

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": {
      "cookie": "<cookie>"
    },
    "name": "browser_set_cookie_object"
  }
}

Input Schema

NameRequiredDescriptionDefault
cookieYesCookie string to set, e.g. 'name=value; Path=/; HttpOnly'

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.1
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed2 schema fields changedv1.0.0
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
  3. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
  4. Added

TDQS

C2.6/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden and does not meet it. It does not state which domain/path the cookie binds to, whether an existing cookie of the same name is overwritten, whether it requires an active page context, or whether the effect is persisted across sessions.

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 wasted words. Its brevity borders on under-specification, but nothing in it is redundant or padded.

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 state-mutating browser tool with no annotations and no output schema, the description is too thin: it omits scope of effect (current tab/domain), overwrite semantics, and error conditions. An agent could call it correctly only by guessing.

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% and the single parameter includes its own example ('name=value; Path=/; HttpOnly'), so the schema already does the explanatory work. The description adds nothing about accepted attribute syntax or limits, which is the baseline-3 case for high coverage.

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

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a clear verb+resource (set a cookie), but it does not distinguish this tool from the sibling browser_add_cookie_by_name, which presumably also sets a cookie. An agent reading only the description cannot tell why one takes a raw cookie string and the other does not.

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 mention of the alternative add_cookie_by_name, and no preconditions such as needing an open page or navigated domain before the cookie can be attached. Usage must be inferred entirely from the name and schema.

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