Skip to main content
Glama

Audit a redirect target

audit_redirect

Validate relative or absolute redirect targets against explicit origin, host, protocol, query, fragment, dot-segment, and blocked-path policies to prevent unsafe redirects.

Instructions

Check a relative or absolute redirect target with redirectcage against explicit origin, host, protocol, query, fragment, dot-segment, and blocked-path policy.

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": {
      "target": "<target>"
    },
    "name": "audit_redirect"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetYes
fallbackNo
allowHashNo
maxLengthNo
allowQueryNo
allowedHostsNo
blockedPathsNo
allowUserinfoNo
allowProtocolsNo
allowedOriginsNo
allowIpLiteralsNo
allowSubdomainsNo
maxDecodeLayersNo
normalizeDotSegmentsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the policy dimensions evaluated: origin, host, protocol, query, fragment, dot-segment, and blocked-path. However, it never says whether the tool performs a network fetch or is purely static analysis, what the outcome looks like on pass/fail, or that it is a read-only operation, so a mutation-averse agent gains only partial assurance.

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 dense sentence that front-loads the verb and resource with no filler. It is appropriately sized, though the packed policy list reads as a hedge rather than as usable information and could be traded for a clearer statement of behavior.

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?

For a 14-parameter tool with zero schema description coverage, no annotations, and no output schema, one sentence leaves too much unknown: the meaning of most parameters, whether failures are exceptions or return values, and default policy behavior when optional policy params are omitted.

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% across 14 parameters, yet the description explains only the 'target' concept via the words 'redirect target'. The words 'explicit origin, host, protocol, query, fragment, dot-segment, and blocked-path policy' loosely gesture at allowedOrigins, allowedHosts, allowProtocols, allowQuery, allowHash, normalizeDotSegments, and blockedPaths, but never maps them or clarifies fallback, maxLength, maxDecodeLayers, allowUserinfo, allowIpLiterals, or allowSubdomains.

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?

The description gives a specific verb ('Check') plus a specific resource ('a relative or absolute redirect target') and names the underlying library (redirectcage), which is enough to separate it from siblings like audit_cors or audit_path. It stops short of explicitly contrasting itself with those siblings, so it lands just under the top mark.

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

Usage Guidelines2/5

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

There is no statement of when to use this tool versus alternatives, no prerequisites, and no mention of what happens when the target violates policy. Usage is only inferable from the word 'Check' and the redirect framing.

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