Skip to main content
Glama
ZenRows
by ZenRows

browser_set_cookies

Set one or more cookies in an active browser session to preserve login, preferences, or tracking state before scraping. Provide session_id and cookie name/value pairs.

Instructions

Set one or more cookies in the browser session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cookiesYesArray of cookie objects to set
session_idYesSession ID returned by browser_navigate

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.7.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and openWorldHint=true, so the safety profile is covered. However the description adds nothing beyond them: it does not say whether existing cookies are overwritten, whether cookies are session- or persistent-scoped, or whether a navigation is required first.

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?

A single front-loaded sentence with no filler. It is appropriately terse for a simple setter, though it verges on under-specification given the tool performs a write.

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?

With annotations carrying the safety profile and the schema documenting cookie fields in detail, the essentials are present. Still, for a mutation tool the description omits any note on overwrite behavior or session context, leaving a mild gap.

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 both session_id and the nested cookie fields (name, value, domain, path, expires, secure, http_only) are fully documented structurally. The description adds no parameter detail, which is acceptable at this coverage but earns no bonus.

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?

States a specific verb (Set) and resource (cookies) with scope (browser session), which distinguishes it from browser_get_cookies and browser_clear_cookies by name. It is clear, though it does not explicitly contrast itself against those siblings.

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?

No when-to-use guidance, no prerequisites, and no mention of alternatives such as browser_get_cookies or browser_clear_cookies. The agent must infer that this is the write counterpart to the cookie-reading tool.

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