Skip to main content
Glama

set_cookies

Adds Playwright-format cookies (name, value, domain/path or URL) to the browser session, enabling authenticated or personalized state before page navigation.

Instructions

Add cookies (Playwright format: name, value, domain, path ... or name, value, url).

Input Schema

NameRequiredDescriptionDefault
cookiesYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, openWorldHint=true, so the safety profile is covered. The description adds no behavioral context beyond that: it does not say whether cookies are merged with or replace existing ones, what scope/session they attach to, or whether a navigation is required. The Playwright format note is parameter guidance, not behavioral disclosure.

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 sentence, front-loaded with the action, with no filler. Nothing could be removed without losing the format hint.

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?

An output schema exists, so return values need no explanation, and the format hint covers the input. But for a state-mutating session tool with a nested-object parameter and no schema descriptions, the definition omits whether cookies merge or overwrite and what context they bind to, leaving a real gap for correct invocation.

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 coverage is 0% and the schema only describes an array of untyped objects, so the description carries the full burden. It does this well by naming two accepted shapes (name/value/domain/path and name/value/url) and anchoring to the documented Playwright cookie format, though the trailing "..." leaves the remaining optional fields unspecified.

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 states a specific verb+resource ("Add cookies"), which is unambiguous and easily distinguished from get_cookies/clear_cookies by name. It stops short of explicitly contrasting with those siblings, so it lands at clear-but-not-differentiating.

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 get_cookies, clear_cookies, or load_session, and no prerequisites (e.g., must a tab be open, does it apply before navigate?). The usage is only inferable from the tool name and the format note.

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