Skip to main content
Glama

cors-preflight

CORS preflight decision from Fetch spec — Takes a browser request shape (origin, method, headers, credentials flag) and a server CORS policy (allow-origin, allow-methods, allow-headers, allow-credentials, expose-headers, max-age) and returns the exact decision a browser would make per the Fetch Living Standard §3.2 and §4.10: whether a preflight OPTIONS is required, whether the main request is allowed, which response headers the script ca

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": {
      "request": "<request>",
      "policy": "<policy>"
    },
    "name": "cors-preflight"
  }
}

Input Schema

NameRequiredDescriptionDefault
policyYes
requestYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does convey that this is a spec-conformant evaluation (Fetch §3.2/§4.10) rather than an actual network call, but it never states that the tool is side-effect free, whether it validates malformed inputs, whether unknown policy fields are rejected, or what the result contains. The truncation cuts off exactly the part that would have described the returned decision, leaving the most behaviorally important detail missing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single long run-on sentence that terminates abruptly mid-word, so the reader gets a dangling clause instead of a complete statement. There is no structural separation between what it does, when to use it, and what it returns. The content is not padded, but the broken delivery costs real clarity.

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?

This tool has two required nested objects and no output schema, so the description is the only place an agent could learn the shape of the returned decision (preflight required? allowed? which headers exposed?). That is precisely the section that is truncated, so the return contract is undocumented. For a nested-input, no-output-schema tool, this is a material gap.

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?

The prose enumerates both object families (origin, method, headers, credentials flag vs. allow-origin, allow-methods, allow-headers, allow-credentials, expose-headers, max-age), which maps the conceptual model onto the two required objects. However, it adds no semantics beyond that enumeration, and the underlying schema already documents each field with detail (wildcard handling, case-insensitivity, credentials interaction). No extra meaning about nesting, wildcard precedence, or defaults is contributed.

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?

States a specific verb+resource: it takes a browser request shape plus a server CORS policy and returns the preflight/allowed decision a browser would make, citing Fetch Living Standard sections. That is far more precise than a tautology and an agent can tell this is a CORS evaluation engine. It loses a point because the sentence trails off mid-clause ('which response headers the script ca') and never names how it differs from neighbors like archive-preflight or csp-audit.

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 only implied by the input model: give it a request shape and a policy to get a decision. There is no explicit statement of when to reach for this versus other diagnostics, no prerequisites, and no note on whether it is a dry-run evaluator (which the 'returns the exact decision' phrasing suggests but never confirms). An agent can infer the scenario, but nothing routes it here over a sibling.

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.

Resources