Skip to main content
Glama

set_cookie

Sets a browser cookie by name and value, with optional domain, path, and tab, so agents can persist session state or preferences during webview automation.

Instructions

Set a cookie.

Input Schema

NameRequiredDescriptionDefault
tabNotab id, defaults to current
nameYes
pathNo
valueYesstring, or array of strings for multi-select
domainNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

D1.8/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 discloses almost nothing. It does not say whether an existing cookie with the same name/domain/path is overwritten, what defaults apply for path/domain/tab, whether the cookie is session-only or persistent, or whether it requires an active page context.

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

Conciseness2/5

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

It is short, but brevity here is under-specification rather than conciseness — the single sentence conveys no information beyond the tool name. Nothing is front-loaded because there is nothing to front-load.

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

Completeness1/5

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

For a 5-parameter mutation tool with no annotations and no output schema, the definition supplies none of the information an agent needs: no defaults, no overwrite semantics, no origin/context requirements, no mention of the sibling read tool.

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

Parameters1/5

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

Schema description coverage is only 40%: name, path, domain, and value have no schema descriptions, and the description adds no meaning for any of the five parameters. Notably it does not clarify the multi-select array form of value or the path/domain defaulting behavior, both of which materially change the resulting cookie.

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

Purpose2/5

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

"Set a cookie" restates the tool name almost verbatim and adds no scope detail: it does not say whether it writes a cookie into the browser context of the current page, a specific tab, or a domain. The sibling "cookies" (presumably the read counterpart) is not referenced, so an agent gets no differentiation signal beyond the verb.

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 statement of when to use this versus reading cookies via the sibling "cookies" tool, nor any prerequisite (e.g., page must be navigated first, cookies only settable for the current origin). Usage is only inferable from the name.

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