Skip to main content
Glama

Robot Actions — Remote Device Control

Webpage set cookie

webpage_set_cookie
Idempotent

Set a cookie on the CURRENT page origin in the device browser (iOS Safari or Android Chrome, auto-detected), via document.cookie. Use to seed auth/session state before a flow. LIMITATION: sets a NON-HttpOnly cookie on the current document origin only (cannot set HttpOnly/Secure-only or cross-domain cookies — that needs the browser CDP Network domain, which the iOS bridge does not expose). Defaults path=/ and a 365-day expiry. Returns { set, name, cookie }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoExpiry in days from now (default 365; 0 = session)
nameYesCookie name
pathNoCookie path (default: /)
udidYesDevice UDID / serial (iOS or Android)
valueYesCookie value
pageIdNoTarget page/tab id — auto-picked when omitted
socketNoAndroid only: abstract unix socket name (default: chrome_devtools_remote)
platformVersionNoIgnored (kept for compatibility)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations (which only signal a non-destructive, idempotent, open-world write), the description discloses the key non-obvious outcomes: it produces a NON-HttpOnly cookie on the current document origin only, cannot do cross-domain, requires CDP Network domain that the iOS bridge lacks, defaults path=/ and 365-day expiry, and returns { set, name, cookie }. That is rich behavioral context an agent cannot get from the structured fields.

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?

Front-loaded with the core action and scope, followed by intended use, then the limitation and defaults. Every sentence, including the long limitation clause, earns its place by preventing misuse.

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

Completeness5/5

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

For an 8-parameter mutation tool with no output schema, the description covers purpose, usage, hard limitations, platform detection, defaults, and the return shape. Nothing an agent needs to call it correctly is missing.

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 the schema already documents every parameter including the path=/ and 365-day defaults. The description repeats those defaults and adds platform auto-detection, but contributes little parameter meaning beyond the schema. Baseline 3 is appropriate.

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?

States a specific verb (set) and resource (cookie) plus the precise scope (CURRENT page origin, iOS Safari or Android Chrome, via document.cookie). An agent can distinguish this from webpage_clear_cookies or the devtools cookie inspectors without opening another schema.

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

Usage Guidelines4/5

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

"Use to seed auth/session state before a flow" gives clear when-to-use context, and the LIMITATION clause implies when NOT to use it (HttpOnly/Secure/cross-domain). It does not name an alternative sibling tool by name for those cases, so it falls just short of explicit routing guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources