Skip to main content
Glama

browser_cookie_set

Destructive

Set a browser cookie with custom name, value, domain, path, expiration, and security flags to manage session or authentication state.

Instructions

Set a cookie with optional flags (domain, path, expires, httpOnly, secure, sameSite)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesCookie name
pathNoCookie path
valueYesCookie value
domainNoCookie domain
secureNoWhether the cookie is secure
expiresNoCookie expiration as Unix timestamp
httpOnlyNoWhether the cookie is HTTP only
sameSiteNoCookie SameSite attribute
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, making the modifying nature of this tool clear. The description adds the list of optional flags (domain, path, expires, httpOnly, secure, sameSite), which provides some extra behavioral context beyond the annotations. However, it does not describe key behaviors such as whether existing cookies are overwritten, how the domain defaults, or error conditions, keeping transparency adequate but not rich.

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?

The description is a single, concise sentence of 12 words that conveys the core action and lists the most important optional flags. It avoids redundancy and fluff, making it quick to parse. However, it could be slightly expanded with a usage hint or sibling differentiation without harming conciseness.

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

Completeness3/5

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

Given the tool's complexity (8 parameters, destructive action) and the presence of complete schema descriptions and annotations, the description provides a reasonable overview. However, it does not explicitly state that setting a cookie modifies the browser's current cookie store, how expiration timestamps work, or the default behavior when domain/path are omitted. These gaps mean the description is only moderately complete for an agent to fully understand the tool's operation.

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%, so each of the 8 parameters already has a clear description. The description's mention of 'optional flags' and listing a subset of parameters does not add significant meaning beyond what the schema provides. The description adds no new constraints, defaults, or usage relationships, so it meets the baseline but does not enhance semantic understanding.

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 'Set a cookie with optional flags' clearly states the verb (set) and resource (cookie), making the tool's purpose unambiguous. Although it does not explicitly contrast with sibling tools like browser_cookie_delete or browser_cookie_clear, the name and action are distinct enough for an AI agent to understand its role among cookie manipulation tools.

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?

The description provides no guidance on when to use this tool versus alternatives (e.g., when to set vs. delete or list cookies). It does not mention prerequisites, typical use cases, or what happens when a cookie with the same name already exists. This lack of context forces the agent to rely solely on heuristics or incomplete reasoning about tool selection.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Pelag-Michael/Chrome-for-AI'

If you have feedback or need assistance with the MCP directory API, please join our Discord server