Skip to main content
Glama
BrowserGenie

BrowserGenie MCP Server

by BrowserGenie

check_security_headers

Check a web page's security HTTP response headers for vulnerabilities in CSP, HSTS, X-Frame-Options, and more to identify missing security protections.

Instructions

Inspect security-related HTTP response headers for the page: CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, and XSS-Protection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoURL to check (default: current page URL)
tabIdNoTarget tab ID (defaults to currently active tab)
apiKeyNoAPI key for authentication if enabled

Implementation Reference

  • The handler function for check_security_headers tool. It sends a 'check_security_headers' command via the WebSocket bridge and returns the result (security headers data) or an error.
      async ({ url, tabId, apiKey }) => {
        const result = await bridge.sendCommand({
          command: 'check_security_headers',
          params: { url },
          tabId,
          apiKey,
          timeout: LONG_TIMEOUT,
        });
        if (!result.success) {
          return { content: [{ type: 'text', text: `Error: ${result.error?.message}` }], isError: true };
        }
        return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
      }
    );
  • Input schema for check_security_headers: optional URL string, optional tabId number, and optional apiKey string.
      url: z.string().optional().describe('URL to check (default: current page URL)'),
      tabId: z.number().optional().describe('Target tab ID (defaults to currently active tab)'),
      apiKey: z.string().optional().describe('API key for authentication if enabled'),
    },
  • The tool is registered as 'check_security_headers' via server.tool() in the registerAuditTools function within src/tools/audit.ts.
    server.tool(
      'check_security_headers',
      'Inspect security-related HTTP response headers for the page: CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, and XSS-Protection.',
      {
        url: z.string().optional().describe('URL to check (default: current page URL)'),
        tabId: z.number().optional().describe('Target tab ID (defaults to currently active tab)'),
        apiKey: z.string().optional().describe('API key for authentication if enabled'),
      },
      async ({ url, tabId, apiKey }) => {
        const result = await bridge.sendCommand({
          command: 'check_security_headers',
          params: { url },
          tabId,
          apiKey,
          timeout: LONG_TIMEOUT,
        });
        if (!result.success) {
          return { content: [{ type: 'text', text: `Error: ${result.error?.message}` }], isError: true };
        }
        return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
      }
    );
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It states the tool 'inspects' headers, indicating a read operation, but does not disclose whether it re-fetches the page, uses cached data, or requires network access. Additional behavioral details are missing.

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 a single, direct sentence that lists the headers inspected. No unnecessary words, well-structured for quick understanding.

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 tool has no output schema, so the description should hint at the return format or results. It only lists the headers checked but not what the output contains (e.g., pass/fail, values). This limits completeness for an agent invoking the tool.

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?

Schema description coverage is 100%, so the schema already documents all parameters. The description adds no extra meaning beyond what the schema provides for url, tabId, and apiKey. 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?

The description clearly states the tool inspects security-related HTTP response headers, listing specific ones (CSP, HSTS, etc.). This is a specific verb-resource combination that distinguishes it from sibling tools like get_network_logs or get_network_request_detail.

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 the tool is used to check security headers of a page, but does not explicitly state when to use it versus alternatives, nor does it provide exclusions or prerequisites. Context is clear but lacking guidance on when not to use.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/BrowserGenie/mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server