Skip to main content
Glama

Analyze security headers

analyze_security_headers
Read-onlyIdempotent

Audit a live website's HTTP security headers and get present/missing values plus ready-to-paste fixes for HSTS, CSP, X-Frame-Options and related protections.

Instructions

Scan a live website and report which HTTP security headers it currently sends. These headers tell the browser how to behave more safely — the main ones are HSTS (force HTTPS), Content-Security-Policy / CSP (block injected scripts and XSS), X-Frame-Options (stop clickjacking), X-Content-Type-Options (stop MIME sniffing), Referrer-Policy (limit what the URL leaks to other sites), and Permissions-Policy (turn off camera/mic/geolocation by default). Read-only — fetches the page once over HTTPS, nothing is changed. Returns: whether HTTPS works, each expected header with present/missing and its current value, a list of the ones that are missing, a recommended best-practice config, and ready-to-paste server snippets (nginx/Apache/Caddy/Cloudflare/_headers) so a beginner can just copy the fix in. Use this to audit a real site's header posture; use generate_security_headers when you just want a fresh best-practice config to apply without scanning anything first.

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": {
      "domain": "<domain>"
    },
    "name": "analyze_security_headers"
  }
}

Input Schema

NameRequiredDescriptionDefault
domainYesDomain name only, e.g. example.com (no URL, path, or port)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.10.0

TDQS

A4.4/5.0
Behavior4/5

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

Adds real context beyond the annotations: it states the operation is a single HTTPS fetch with nothing changed, which reinforces and elaborates readOnlyHint/idempotentHint, and — with no output schema — it spells out the return shape (HTTPS status, per-header present/missing + value, missing list, recommendation, server snippets). It omits failure modes (unreachable host, non-HTTPS site) and any rate/limit behavior, so it stops short of a 5.

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?

Front-loaded with purpose and safety, then returns, then the sibling routing — a sensible order. The parenthetical explaining each header (HSTS, CSP, X-Frame-Options, etc.) is longer than an agent strictly needs for selection and could be trimmed, though it does define scope.

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 one-parameter, read-only scan with no output schema, the description covers what is fetched, what is returned, that nothing is mutated, and when to prefer the sibling. An agent has everything needed to invoke it correctly and interpret the result.

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?

Single parameter with 100% schema description coverage, including the 'domain only, no URL/path/port' constraint, so the schema carries the semantics. The description adds only the framing that the target is a live site; it says nothing about subdomain/wildcard handling or what the tool does with an invalid domain. Baseline 3 is appropriate.

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?

Specific verb (scan) plus resource (a live site's HTTP security headers), and it enumerates the headers in scope so the agent knows the exact output domain. It also names the sibling it is not (generate_security_headers), so it is distinguishable without opening any schema.

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

Usage Guidelines5/5

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

Explicit routing: 'Use this to audit a real site's header posture; use generate_security_headers when you just want a fresh best-practice config to apply without scanning anything first.' That is an explicit when-to-use plus the condition that selects the alternative, not merely implied guidance.

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