Skip to main content
Glama

Audit a CORS policy

audit_cors

Lint a CORS configuration with corscage and optionally evaluate a bounded request for origin, method, preflight, credential, private-network, and header exposure decisions.

Instructions

Lint a CORS configuration with corscage and optionally evaluate a bounded request shape for origin, method, preflight, credential, private-network, and header exposure decisions.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "audit_cors"
  }
}

Input Schema

NameRequiredDescriptionDefault
policyNo
evaluateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full burden and leaves key traits unstated: it never says the operation is non-mutating (only 'lint' implies it), what the output looks like, whether findings carry severities, or whether the supplied policy is echoed or transformed. The enumeration of decision axes is useful context about analysis coverage, but it does not compensate for the absence of any behavioral or safety disclosure on a tool taking a free-form nested object.

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?

A single front-loaded sentence with the verb first and no filler. It is dense with jargon ('bounded request shape', 'private-network') but every clause contributes information about scope, so it earns its length.

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

Completeness2/5

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

Two optional parameters including a deeply nested object, no annotations, no output schema, and 0% schema description coverage — this definition should do far more. The critical omission is what shape the 'policy' object must take, without which an agent cannot reliably construct a valid call, and there is no indication of the response structure.

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%, so the description must explain both parameters and does not. The 'policy' object is entirely undocumented — no hint whether it is an inline CORS config, a file path, or a normalized structure — which is the more consequential gap. Only the evaluate path is loosely mapped to terms like 'origin', 'method', and 'header exposure', and even there the mapping to evaluate.headers (a name/value map) is ambiguous.

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?

Names a specific verb ('Lint') and resource ('a CORS configuration') plus the underlying engine ('corscage'), which cleanly separates it from siblings like audit_cookie and audit_headers. It also enumerates the decision areas covered (origin, method, preflight, credentials, private network, header exposure), so an agent knows this is CORS-policy-specific analysis rather than generic header auditing.

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 word 'optionally' signals there are two modes — lint-only versus lint plus a request-shape evaluation — and the enumerated decision areas hint at what the evaluate path is for. However, there is no explicit guidance on when to call this versus a sibling audit tool, no prerequisites, and no statement about what happens when both optional parameters are omitted.

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