Skip to main content
Glama

cookie_audit

Follows a host's redirect chain, audits each Set-Cookie for Secure, HttpOnly, and SameSite flags, and grades cookie security while flagging HTTPS to HTTP downgrades.

Instructions

Follow a host's redirect chain and audit the cookies it sets.

Walks each redirect hop (capped at 10) from the host, recording status and Location and flagging any HTTPS->HTTP downgrade. Every Set-Cookie seen along the way is checked for the Secure, HttpOnly, and SameSite flags and graded. Cookie values are never returned (they may be secrets).

Args: host: Hostname to inspect, e.g. "example.com". port: TCP port. Defaults to 443 when use_ssl is True, else 80. use_ssl: Start the chain over HTTPS (default True). timeout: Per-hop network timeout in seconds.

Returns: A dict with host, redirect_chain, final_url, cookies (flags only), cookie_grade, cookie_score, and a findings list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYes
portNo
timeoutNo
use_sslNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.13.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that the tool follows redirects (capped at 10), flags downgrades, checks cookie flags, and explicitly states that cookie values are never returned because they may be secrets. This is strong behavioral disclosure, though it does not mention non-destructive nature or error behavior explicitly.

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?

The description is well-structured and front-loaded with a one-line summary, followed by clear sections for behavior, arguments, and return value. Every sentence provides essential information without fluff or redundancy.

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

Completeness5/5

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

For a tool with 4 parameters, no output schema, and no annotations, the description is highly complete. It explains the tool's operation, parameter semantics, and return structure, including the fields in the returned dict. An agent has all necessary information to call it correctly.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate. It does so thoroughly with an 'Args:' section explaining each parameter, including defaults and interdependencies (e.g., port default depends on use_ssl). This adds significant meaning beyond the raw schema.

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: 'Follow a host's redirect chain and audit the cookies it sets.' It further details the audit of each redirect hop, recording status, Location, and HTTPS->HTTP downgrades, and checking cookie flags. This clearly distinguishes it from sibling tools like http_headers_audit or tls_check.

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 description implies usage (when you want to audit cookies and redirects) but does not explicitly state when to use this tool over alternatives, nor does it mention when not to use it. There is no reference to sibling tools or exclusions, so the guidance is only implied.

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