Skip to main content
Glama
andresolbach

nodriver-mcp-server

Set cookie

set_cookie
Idempotent

Set a browser cookie to inject session tokens or consent flags without going through login. This creates a session cookie that expires when the browser closes.

Instructions

Set a single browser cookie.

Useful for injecting a known session token, consent flag or A/B bucket without walking through a login flow.

This creates a session cookie: no expiry, gone when the browser closes. To restore a full cookie set including expiry and SameSite, use load_session. Cookies are browser-wide, not per tab.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesCookie name.
pathNoURL path the cookie is scoped to. "/" covers the whole site./
valueYesCookie value.
domainYesDomain the cookie belongs to, e.g. "example.com". A leading dot (".example.com") makes it apply to subdomains as well.
secureNoSend the cookie over HTTPS only. Browsers require this for any cookie with SameSite=None.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Beyond the annotations, the description discloses that the cookie is a session cookie ('no expiry, gone when the browser closes') and that cookies are browser-wide, not per tab. This is meaningful behavioral context that the annotations do not convey and helps the agent anticipate side effects.

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 compact and well-structured: purpose first, then use-case motivation, then key behavioral facts, then the alternative. Every sentence adds distinct value without unnecessary repetition or filler.

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 a straightforward single-cookie setter, the description covers purpose, applicable use cases, session-cookie behavior, scope (browser-wide), and the appropriate alternative when a full cookie set is needed. An output schema exists, so return-value details are not required. This is complete for the tool's complexity.

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?

Since the schema has 100% description coverage for all five parameters, the baseline is 3. The description does not add parameter-level details beyond the schema, but it reinforces that a single cookie is being set and gives examples of cookie values, which is mild added context.

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 'Set a single browser cookie,' which is a specific verb+resource statement that clearly identifies the tool's function. It also distinguishes itself from related tools like load_session and get_cookies by framing it as a single-cookie, session-scoped operation.

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

Usage Guidelines5/5

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

The description explicitly states when to use it ('injecting a known session token, consent flag or A/B bucket without walking through a login flow') and provides a direct alternative for a different use case ('To restore a full cookie set including expiry and SameSite, use load_session'). This gives clear decision guidance.

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

Install Server

Other Tools

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/andresolbach/nodriver-mcp-server'

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