Skip to main content
Glama

set_cookies

Write cookies into the live browser profile using CDP, handling HttpOnly and cross-path cookies. If CDP is unavailable, falls back to document.cookie and reports cookies that couldn't carry HttpOnly.

Instructions

Write cookies into the real browser profile. Takes one cookie object or a list (JSON text is accepted): name is required, plus optional value/url/domain/path/expires (Unix seconds)/httpOnly/secure/sameSite. Uses CDP Network.setCookie so HttpOnly and cross-path cookies work; falls back to document.cookie only if CDP is unavailable, and then says which cookies could not carry HttpOnly. Cookies with neither url nor domain are scoped to the current page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tab_idNo
cookiesYes
timeoutNo
session_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description fully carries the behavioral disclosure burden. It explicitly discloses the CDP Network.setCookie mechanism, the document.cookie fallback, the HttpOnly limitation in fallback mode, and how cookies are scoped when neither url nor domain is provided. This gives the agent strong expectations about side effects and limitations.

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

Conciseness5/5

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

The description is dense but well organized: purpose first, then input format and required fields, then mechanism/fallback behavior. Every sentence adds useful information, and there is no filler or repetition.

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

Completeness4/5

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

The description covers the essential behavior, input format, fallback path, and scoping rules, and an output schema exists so return values need not be described. The main gap is the lack of explanation for tab_id, timeout, and session_id, which leaves some invocation details underspecified.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate. It thoroughly explains the cookies parameter: accepts a single object or array, JSON text accepted, required name, and all optional cookie fields with expires expressed in Unix seconds. However, tab_id, timeout, and session_id are not explained beyond their names and defaults.

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

Purpose5/5

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

The description opens with a clear verb and resource: 'Write cookies into the real browser profile.' It also details the accepted input shape and required fields, making the tool's purpose unambiguous and distinct from siblings like get_cookies or delete_cookies.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description makes the general use case clear but never explicitly says when to use this tool over alternatives such as storage_set or set_site_permission. There is no when-to-use or when-not-to-use guidance, so an agent must infer the appropriate context from the name and description.

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

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/LinVireo/browsertap-mcp'

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