Skip to main content
Glama

cors_check

Probe a host's CORS policy with a crafted Origin, flagging reflected untrusted origins or credential-allowing misconfigurations. One read-only request returns graded severity.

Instructions

Probe a host's CORS policy with a crafted Origin and flag misconfigurations.

Sends one GET with an untrusted Origin header and inspects the Access-Control-Allow-Origin / -Allow-Credentials response. Reflecting an arbitrary Origin while allowing credentials is high severity (any site can read authenticated responses); a wildcard or a trusted 'null' origin are lesser issues. One request, read-only.

Args: host: Hostname to test, e.g. "example.com". port: TCP port. Defaults to 443 when use_ssl is True, else 80. use_ssl: Connect over HTTPS (default True). timeout: Network timeout in seconds.

Returns: A dict with host, port, test_origin, acao, allows_credentials, reflects_origin, wildcard, severity, and a findings list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYes
portNo
timeoutNo
use_sslNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.13.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden. It explicitly states it sends one GET with an untrusted Origin header, inspects Access-Control-Allow-Origin and Allow-Credentials, classifies severity, and is read-only. This gives the agent a reliable behavioral model.

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 well-structured and front-loaded with purpose and behavior, followed by concise parameter and return documentation. Every sentence adds useful information without redundancy.

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?

The description provides everything needed to call the tool correctly: behavior, parameter semantics, severity interpretation, and the exact return keys. Without an output schema, the explicit return dictionary fills the gap completely.

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?

Schema description coverage is 0%, so the description must fully compensate. It explains every parameter: host with an example, port default behavior based on use_ssl, use_ssl semantics, and timeout units. This goes well beyond the bare schema.

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 opens with a specific verb and resource: 'Probe a host's CORS policy with a crafted Origin and flag misconfigurations.' It clearly states what the tool does and the behavior that distinguishes it from probing or audit siblings.

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 gives clear context for when to use it: to test a host for CORS misconfigurations. It also notes 'One request, read-only,' implying a lightweight check. It does not explicitly name alternatives or state when not to use it, but the context is still clear.

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