Skip to main content
Glama

test_cors

Test a URL for CORS misconfigurations by sending requests with varied Origin headers to uncover origin reflection, null origin acceptance, and credential-based access risks.

Instructions

Test a URL for CORS (Cross-Origin Resource Sharing) misconfigurations.

Sends requests with various Origin headers to detect if the server blindly reflects origins, allows null origins, or permits arbitrary cross-origin requests with credentials.

Common CORS vulnerabilities detected:

  • Origin reflection (server echoes back any Origin header)

  • Null origin acceptance (dangerous with sandboxed iframes)

  • Subdomain wildcard bypass (e.g. evil.target.com accepted)

  • Credentials with wildcard (Access-Control-Allow-Credentials: true + *)

  • Trusted origin misconfiguration (pre-domain spoofing)

Args: url: Target URL to test. custom_origins: Additional origin values to test. timeout_seconds: HTTP request timeout in seconds.

Returns: CORS test results with identified vulnerabilities and evidence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
custom_originsNo
timeout_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description carries full responsibility for behavioral disclosure. It thoroughly explains what the tool does (sends requests with various Origin headers), what it detects (specific vulnerabilities listed), and what it returns (results with evidence). This goes well beyond minimal expectations.

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 efficiently structured, starting with the core purpose, followed by a bulleted list of detected vulnerabilities, and ending with parameter details. Every sentence adds value without unnecessary fluff.

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?

Given the tool's complexity (CORS scanner with multiple vulnerability checks), the description covers all necessary aspects: purpose, behavior, parameters, and return value. The output schema further clarifies return structure, so the description is complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no descriptions (0% coverage), but the description compensates fully with an Args section: 'url: Target URL to test.', 'custom_origins: Additional origin values to test.', 'timeout_seconds: HTTP request timeout in seconds.' This adds meaning beyond the schema's type definitions.

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's purpose: 'Test a URL for CORS (Cross-Origin Resource Sharing) misconfigurations.' It specifies the resource (URL), the action (test), and the specific focus (CORS misconfigurations), distinguishing it from sibling tools like analyze_headers or httpx_probe.

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

Usage Guidelines4/5

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

The description implies usage when CORS misconfigurations are suspected, providing clear context (detecting origin reflection, null origins, etc.). However, it does not explicitly mention alternatives or when not to use this tool, so it falls short of a 5.

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/rfunix/tengu'

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