Skip to main content
Glama

Redirect Chain

redirect_chain
Read-onlyIdempotent

Walk HTTP redirect chains hop-by-hop to deobfuscate URL shorteners, audit suspicious links, and trace marketing redirects, returning per-hop details and chain summary.

Instructions

Walk an HTTP redirect chain hop-by-hop, returning per-hop {url, status_code, location, latency_ms}. Use to deobfuscate URL shorteners (bit.ly / t.co / lnkd.in), audit suspicious links from phishing investigations, or trace marketing tracking redirects. SSRF-guarded: each redirect target's resolved IP is re-validated before connecting (private IPs and non-HTTP schemes rejected). Up to 10 hops; loop_detected=true if a hop would revisit a previously-seen URL (we abort before the duplicate fetch); truncated=true if the chain still had a 30x at hop 10. Per-target eTLD+1 throttle (60 req/min) consumed once for the start host AND once per new host reached — a chain across 11 unrelated domains cannot bypass the cap. Free: 30/hr, Pro: 500/hr. Returns {start_url, final_url, hops, hop_count, final_status, loop_detected, truncated, summary}. Returns 502 ErrorResponse on hard fetch failure (timeout / TLS / connect); 429 with Retry-After if a hop's eTLD+1 throttle is exceeded mid-chain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesFull URL whose redirect chain to walk, e.g. 'https://bit.ly/3xyz' or 'http://example.com/old-path'. Must start with http:// or https://. Pass the URL exactly as you'd `curl -L` it; the server handles encoding.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Beyond annotations (readOnlyHint, idempotentHint, destructiveHint), the description adds significant behavioral details: SSRF-guarded with IP re-validation, loop detection with loop_detected flag, truncation at 10 hops, per-target eTLD+1 throttle with specific rate limits (60 req/min), and hard fetch failure handling. No contradictions with annotations.

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?

The description is a single paragraph but well-structured: it opens with the core action and output, then lists use cases, followed by technical details (SSRF, limits, errors). Every sentence adds value without redundancy. It could be slightly more scannable, but it is compact and informative.

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?

For a tool with one parameter and a detailed output schema (described in text), the description covers all essential aspects: purpose, use cases, technical behavior (SSRF, loops, truncation), rate limits, error handling (502, 429 with Retry-After). It provides a complete picture without requiring the user to infer anything.

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

Parameters4/5

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

The single parameter 'url' is already well-documented in the input schema (100% coverage). The description adds practical usage guidance: 'Pass the URL exactly as you'd `curl -L` it; the server handles encoding.' This enriches the schema description with an intuitive analogy and reassurance about encoding, providing added value.

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?

Description clearly states the tool walks an HTTP redirect chain hop-by-hop, specifying the exact per-hop data returned {url, status_code, location, latency_ms}. It lists concrete use cases (deobfuscating URL shorteners, audit suspicious links, trace marketing redirects), which distinguishes it from sibling tools that are primarily lookups and scans.

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?

Description provides explicit use cases for when to use the tool (deobfuscate shorteners, audit links, trace redirects). It also details limits (10 hops, rate limits) and error responses (502, 429). However, it does not explicitly state when not to use it or mention alternatives, though sibling tools don't offer similar functionality.

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/UPinar/contrastapi'

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