Skip to main content
Glama

Audit or serialize cookies

audit_cookie

Parse Cookie headers with duplicate-key and percent-encoding protection, or serialize Set-Cookie values using hardened defaults; parsed values are redacted from responses.

Instructions

Parse a Cookie header with duplicate and percent-encoding protection, or serialize a Set-Cookie value with hardened cookiecage defaults. Parsed cookie values are redacted from the response.

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": {
      "mode": "<mode>"
    },
    "name": "audit_cookie"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYes
nameNo
valueNo
headerNo
optionsNo
parseOptionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries full behavioral burden. It usefully discloses output redaction ('Parsed cookie values are redacted from the response') and hardened serialization defaults — non-obvious behaviors worth credit — but says nothing about error handling for malformed headers or what serialize returns.

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?

Two tight sentences, front-loaded with the parse mode and following with serialize and the redaction caveat. No filler or restated title.

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

Completeness3/5

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

The redaction note partially compensates for the absent output schema, but with six parameters, two opaque nested option objects, and mode-dependent inputs, the definition does not give an agent enough to call this confidently beyond mode selection.

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

Parameters2/5

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

Schema description coverage is 0% for six parameters, including two free-form nested objects (options, parseOptions) with additionalProperties:true. The description names no parameter and never explains what those option objects accept, leaving half the surface undocumented in both schema and prose.

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?

The description names both modes with specific verbs and resources: 'Parse a Cookie header' and 'serialize a Set-Cookie value'. That is clearly distinguishable from the sibling audits (cors, env, headers, redirect), though it never explicitly contrasts itself with them.

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

Usage Guidelines3/5

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

The 'or' structure signals two modes matching the mode enum, so an agent can infer parse-vs-serialize intent. But there is no explicit statement of which parameters belong to which mode (header for parse vs name/value for serialize), and no when-not-to-use or alternative guidance.

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