Skip to main content
Glama

browser_saveCookies

Save browser profile cookies to a JSON file for session restoration, optionally restricted to specific domains to preserve targeted login states.

Instructions

Save cookies for this browser profile as a JSON file in ~/.bwb/sessions (permissions 600). The file contains live login credentials: treat it like a password. Pass domains to save only some sites. After loading, navigate to the target site for cookies to apply.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>"
    },
    "name": "browser_saveCookies"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesName for this session (e.g., 'gmail')
domainsNoOnly save cookies for these domains (optional; default: all)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv4.5.0
    • addedInput schema / properties / domains
      Added value: +{
      +  "description": "Only save cookies for these domains (optional; default: all)",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / name / description
      Previous value: -"Name for this session (e.g., 'twitter-login', 'gmail')"New value: +"Name for this session (e.g., 'gmail')"
  2. Addedv3.2.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full behavioral load and does well: it discloses the destination path, file permission mode 600, and a security warning that the file holds live login credentials. It doesn't state whether an existing session file of the same name is overwritten or what the call returns, which is the remaining gap for a no-annotation 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 core action and file path are front-loaded, and the security warning earns its space given the credential-storage risk. The final sentence about navigating after loading is slightly off-topic for a save operation, a small structural distraction but not wasted text.

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?

With only two fully described parameters and no output schema, the definition covers what an agent needs to invoke it correctly, including the sensitive-data caution. The absence of overwrite/return behavior is a minor completeness gap for a file-writing tool.

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 coverage is 100%, so both `name` and `domains` are already documented, including the default of 'all'. The description's mention of `domains` restates that filtering behavior rather than adding new syntax, format, or edge-case meaning, so the baseline 3 applies.

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 a specific verb and resource ('Save cookies for this browser profile') and immediately pins down the artifact and its location ('a JSON file in ~/.bwb/sessions'). The closing note about loading cookies makes the pairing with browser_loadCookies explicit enough that an agent can pick the right one without opening either 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 gives a concrete usage rule ('Pass `domains` to save only some sites') and practical sequencing guidance ('After loading, navigate to the target site for cookies to apply'). It stops short of explicit when-not-to-use or a named alternative for restoring sessions, which keeps it below a 5.

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