Skip to main content
Glama

Diagnose CORS Policy

diagnose_cors_policy
Read-only

Analyze CORS HTTP request and response headers for wildcard/credential security violations, missing Vary: Origin, preflight OPTIONS handling, and header exposure.

Input Schema

NameRequiredDescriptionDefault
request_originYesThe incoming HTTP request Origin header (e.g. "https://app.example.com").
response_headersYesThe server HTTP response headers (as key-value map or list of "Header: Value" strings).
with_credentialsNoWhether the cross-origin request includes cookies or authorization credentials.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / response_headers / items
      Previous value: -[]New value: +{}
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety and locality are covered. The description goes beyond that by disclosing the concrete detection categories it evaluates (wildcard+credentials, Vary: Origin, preflight OPTIONS, exposed headers), which tells the agent what behavior to expect from the analysis. It stops short of describing the result shape or any confidence/severity semantics.

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?

A single front-loaded sentence that names the act first and then the checks, with zero filler. Every clause adds an evaluation criterion rather than restating the title.

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

Completeness4/5

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

There is no output schema, so the description should carry return-value semantics; it partially does by implying the detector categories, but never says what the response looks like (violations list, pass/fail, severity). For a stateless pure-analysis tool with a fully documented input schema and safety annotations, the coverage is nearly sufficient, just missing the output contract.

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% across all three parameters, including examples for request_origin, accepted formats for response_headers, and the credentials flag. The description adds no parameter-level detail beyond this, so the baseline of 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?

States a specific verb ("Analyze") and a specific resource (CORS HTTP request/response headers), then enumerates the exact classes of issues it detects: wildcard/credential violations, missing Vary: Origin, preflight OPTIONS handling, header exposure. No sibling in the list overlaps this domain, so an agent can select it unambiguously.

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?

Usage is implied by the resource: an agent holding an Origin and a set of response headers should call this. However, the description never states when to reach for it versus alternatives, nor any prerequisite such as needing both the request Origin and the raw response headers before invoking. Implied-only guidance lands at 3.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.