Skip to main content
Glama
CapMonsterCloud

capmonster-mcp-patchright

Official

browser_cookie_set

Set browser cookies with optional flags like secure, httpOnly, sameSite, and expiry, using a URL or domain to define scope.

Instructions

Set a cookie with optional flags. Provide url, or domain (path defaults to /). If neither given, the active page's origin is used.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoURL the cookie applies to. Alternative to domain/path.
nameYes
pathNoCookie path, default /.
valueYes
domainNoCookie domain, e.g. .example.com
secureNo
expiresNoExpiry as Unix timestamp (seconds). Session cookie if omitted.
httpOnlyNo
sameSiteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the burden and does disclose useful defaults: path defaults to / and active page origin is used as a fallback. It does not explain overwrite behavior, failure if no active page exists, persistence, or security restrictions that may affect cookie setting.

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?

A single tight sentence front-loads the action and key defaults with no filler. Every phrase earns its place.

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?

The essential target-selection rule is present, which covers straightforward invocation. However, with 9 parameters, no annotations, and no output schema, several flag semantics and failure behaviors remain implicit, leaving clear gaps for less common calls.

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 only 44%, and the description adds the important relationship between url, domain, path, and active-page fallback. It does not elaborate on name, value, secure, httpOnly, or sameSite, though their names are largely self-explanatory.

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 operation ('Set a cookie') and resource, with the optional flags scope clearly implied. It is distinguishable from sibling cookie_get/list/delete/clear tools because the verb 'set' names the write action.

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?

Provides concrete guidance on how to address the cookie: pass url, pass domain, or rely on the active page origin when neither is supplied. It does not explicitly discuss alternatives or when-not conditions, but the target-selection guidance is clear and actionable.

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