Skip to main content
Glama

browser_add_cookie_by_name

Adds a named cookie with a specified value to the browser session, enabling authenticated or stateful web interactions.

Instructions

Add a cookie to 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": {
      "name": "<name>",
      "value": "<value>"
    },
    "name": "browser_add_cookie_by_name"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesName of the cookie to add
valueYesValue of the cookie to add

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?

With no annotations, the description carries the full burden, yet it only says "add". It does not disclose whether the cookie is scoped to the current page domain, what happens when a cookie with the same name already exists (overwrite vs. duplicate), whether the addition is visible to subsequent navigations, or what is returned. For a mutation tool with zero annotation coverage this is a substantial gap.

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 short sentence, front-loaded and free of padding. It is efficient, though the terseness reflects under-specification rather than disciplined editing.

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 simple two-parameter mutation tool with no annotations and no output schema, the description should at least state the domain/tab scoping and duplicate-name behavior. Neither is covered, so an agent cannot predict the effect of the call with confidence.

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% for both parameters, so name and value are already documented in the schema, including the 4096-char limit. The description adds nothing beyond that, so the baseline of 3 applies.

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?

"Add a cookie to the browser" is a verb plus resource, so the basic action is intelligible, but it does not distinguish this tool from the sibling browser_set_cookie_object or explain what "by_name" implies (name/value pair rather than a full cookie object). The distinction an agent would need in order to choose correctly is left entirely implicit.

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 instead of browser_set_cookie_object or browser_add_cookie-style alternatives, and no prerequisites such as needing an active page or domain context. The agent must infer selection criteria from tool names alone.

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