Skip to main content
Glama

Import many cookies at once

browser_import_cookies
Destructive

Sets multiple cookies in a single shared Firefox BiDi session and reports per-item failures, avoiding separate calls while only one active session is allowed.

Instructions

Set a batch of cookies in one call instead of one browser_set_cookie per cookie. Needed because Firefox allows only ONE active BiDi session, so an external script cannot open its own connection while this server holds the session — the batch has to run inside the shared session. Pass an array of {name, value, domain, path, expirySeconds, secure, httpOnly, sameSite}. Reports per-item failures instead of stopping on the first error.

Input Schema

NameRequiredDescriptionDefault
cookiesYesCookies to set

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

The annotations already declare this as a non-read-only, destructive mutation, and the description adds useful behavioral context: it runs inside the shared BiDi session and reports per-item failures rather than aborting on the first error. It does not explain whether existing cookies are overwritten, which is a meaningful gap for a destructive cookie-setting tool.

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?

The description is front-loaded with the purpose and sibling comparison, followed by the operational rationale and error behavior. The parameter list largely duplicates the schema, which is a minor waste, but the overall structure is efficient.

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

Completeness4/5

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

Given annotations that flag this as destructive and a complete input schema, the description covers the key operational details an agent needs: batch shape, the BiDi session reason, and per-item failure behavior. It is slightly incomplete on cookie overwrite/duplication semantics, but sufficient for correct invocation.

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 the array and item fields. The description repeats the field list but adds no further semantics such as expiry interpretation, sameSite behavior, or which fields are required beyond what the schema already provides.

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 states a specific action and resource: setting a batch of cookies in one call, explicitly contrasted with browser_set_cookie. An agent can distinguish it from the single-cookie sibling and the file-import sibling without opening any 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?

It clearly names browser_set_cookie as the per-cookie alternative and explains why batching is necessary under Firefox's single active BiDi session. It does not mention browser_import_cookies_from_file, which is another plausible alternative, and gives no explicit when-not guidance.

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

Deploy Server

Other Tools