Skip to main content
Glama

add_cookie

Add or update a cookie in a cookie jar with a key, value, domain, path, expiry, and security flags so API requests send the correct session and auth data.

Instructions

Add or update a cookie in a cookie jar.

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": {
      "jar_id": "<jar_id>",
      "key": "<key>",
      "value": "<value>",
      "domain": "<domain>"
    },
    "name": "add_cookie"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYes
pathNo/
valueYes
domainYes
jar_idYes
secureNo
expiresNoISO date string
http_onlyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6-beta

TDQS

C2.4/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden but only hints at upsert semantics via "add or update." It does not disclose what happens on key/domain/path collisions, whether existing values are overwritten, what permissions or state are required, or how failures are surfaced.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with zero filler, but for an 8-parameter mutation tool the brevity reads as under-specification rather than discipline. The one sentence is well-placed but carries too little.

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

Completeness2/5

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

A cookie-mutating tool with 8 parameters, no annotations, no output schema, and near-zero schema description coverage needs the description to explain collision/overwrite behavior, defaults, and permission requirements. None of that is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only 13% of the 8 parameters are documented in the schema, so the description must compensate, and it does not: it never mentions jar_id, domain, path, secure, http_only, or expires. An agent gets no meaning from the description beyond what a bare field name supplies.

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?

"Add or update a cookie in a cookie jar" gives a specific verb (add/update, i.e., upsert) and resource (cookie in a jar), which is clearly distinct from get_cookie_jar, list_cookie_jars, and clear_cookies. It stops short of explicitly naming those siblings or the conditions that separate it from them.

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 is given beyond the verb itself. Nothing tells the agent when to reach for this tool versus clear_cookies or export_cookies, nor what prerequisites apply (e.g., whether the jar must already exist).

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