Skip to main content
Glama

Cookie 管理

browser_cookies
Destructive

Read, set, or clear browser session cookies across visited sites to test and maintain login states; set cookies by providing a URL, name, and value.

Instructions

Get / set / clear cookies of the browser session (covers all sites the session has visited). Essential for login-state testing. set requires url + name + value.

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": {
      "action": "<action>"
    },
    "name": "browser_cookies"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNo(get/set/clear) Cookie belongs to this URL; with clear, only cookies for this site are removed
nameNo(get: filter by name; set: cookie name; clear: only clear this name)
tabIdNoTab id (default: active tab)
valueNo(set) Cookie value
actionYesOperation
domainNo(set/clear filter) Cookie domain
secureNo(set) Secure flag (default: true for https URLs)
httpOnlyNo(set) HttpOnly flag
expiresSecondsNo(set) Expires in N seconds from now (omit = session cookie)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and non-idempotent, so safety is covered. The description adds meaningful context beyond that: the operation spans all sites the session has visited, so get returns everything and clear has session-wide blast radius unless narrowed. It could say more about what get returns, but the risk profile is well conveyed.

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?

Three short sentences, front-loaded with the capability, then scope, then the conditional prerequisite. No filler or restated title.

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?

For a 9-parameter mutation tool with full schema coverage and no output schema, the definition supplies capability, scope, and the key prerequisite. Only minor gaps remain, such as whether get returns cookie objects or how clearing behaves with no arguments beyond what the parameter descriptions imply.

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?

With 100% schema coverage the baseline is 3; the description earns a 4 by stating that set additionally requires url + name + value, which the schema does not express (only action is required there). That is a genuine constraint beyond structured data.

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?

Names specific verbs (get / set / clear) against a specific resource (browser session cookies) and clarifies scope: 'covers all sites the session has visited'. An agent immediately knows this is session-level cookie management, not site-scoped storage, and can place it amid navigation/network siblings.

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?

Gives a concrete motivating scenario ('essential for login-state testing') and a prerequisite tip for the set action ('requires url + name + value'). It stops short of explicit when-not guidance or naming alternatives, but the use context is clear and actionable.

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