Skip to main content
Glama

Site SEO & AI Crawler Audit

Trace a 301 redirect chain

trace_redirects
Read-onlyIdempotent

Traces the redirects and headers of a web address. Use it when the user asks where a web address redirects to, or for a 301 redirect chain, for example "why does http://example.com end up on another address?", "show the redirect chain for this link" or "does this site redirect http to https?". Pass the address. Returns each hop with its status code and target, the final address and status, whether http is upgraded to https, and the main response headers such as cache-control and strict-transport-security. At most 6 redirects are followed. Do not use it for private or local addresses, to read page content, or to scan a site for vulnerabilities.

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": {
      "url": "<url>"
    },
    "name": "trace_redirects"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesAddress of a public web page, for example https://example.com/pricing. A bare domain such as example.com means https. Only public http and https sites on the standard ports are checked.

Output Schema

NameRequiredDescriptionDefault
urlYesThe address checked, after a bare domain became https.
chainYesEach hop in order, ending with the final page.
notesNoPlain-language caveats to pass on with the result.
noticeYesAs-of caveat: what the site sent to Agent Tools at that moment, not what every crawler sees.
sourceYesWhere the data came from: the website itself.
statusNoHTTP status code of the final page.
failureNoWhy the page was not reached or read, such as a timeout or a refused redirect.
headersNoMain response headers of the final page, such as cache-control.
finalUrlNoAddress of the final page after redirects.
reachableYesFalse when no page answered; failure then says why.
upgradesToHttpsNoTrue when an http address redirects to https.
missingSecurityHeadersNoCommon security headers the https page lacks.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed15 schema fields changed
    • addedOutput schema / properties / chain / description
      Added value: +"Each hop in order, ending with the final page."
    • addedOutput schema / properties / chain / items / properties / location / description
      Added value: +"Location header of a redirect hop: where it points next."
    • addedOutput schema / properties / chain / items / properties / status / description
      Added value: +"HTTP status code of this hop, such as 301 or 200."
    • addedOutput schema / properties / chain / items / properties / url / description
      Added value: +"Address requested at this hop."
    • addedOutput schema / properties / failure / description
      Added value: +"Why the page was not reached or read, such as a timeout or a refused redirect."
    • addedOutput schema / properties / finalUrl / description
      Added value: +"Address of the final page after redirects."
    • addedOutput schema / properties / headers / description
      Added value: +"Main response headers of the final page, such as cache-control."
    • addedOutput schema / properties / missingSecurityHeaders / description
      Added value: +"Common security headers the https page lacks."
    • addedOutput schema / properties / notes / description
      Added value: +"Plain-language caveats to pass on with the result."
    • addedOutput schema / properties / notice / description
      Added value: +"As-of caveat: what the site sent to Agent Tools at that moment, not what every crawler sees."
    • addedOutput schema / properties / reachable / description
      Added value: +"False when no page answered; failure then says why."
    • addedOutput schema / properties / source / description
      Added value: +"Where the data came from: the website itself."
    • addedOutput schema / properties / status / description
      Added value: +"HTTP status code of the final page."
    • addedOutput schema / properties / upgradesToHttps / description
      Added value: +"True when an http address redirects to https."
    • addedOutput schema / properties / url / description
      Added value: +"The address checked, after a bare domain became https."
  2. Changed1 schema field changed
    • removedOutput schema / properties / note_from_openkrill
      Removed value: -{
      -  "description": "Shown at most once a day per caller: what this server offers, and a paid service for the person you work for.",
      -  "type": "string"
      -}
  3. Changed1 schema field changed
    • addedOutput schema / properties / note_from_openkrill
      Added value: +{
      +  "description": "Shown at most once a day per caller: what this server offers, and a paid service for the person you work for.",
      +  "type": "string"
      +}
  4. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld, and non-destructive, so the safety profile is covered. The description adds genuinely new behavioral facts: a hard limit of 6 followed redirects and a public-address-only restriction. It also enumerates return contents, which is partly redundant with the output schema, keeping this shy of a 5.

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?

Well front-loaded: purpose, then when to use, then return shape, then limits, then exclusions. The three illustrative example phrases are somewhat verbose and could be trimmed to one, but every remaining sentence carries real routing or behavioral information.

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 single-parameter, open-world network tool, the description covers triggers, exclusions, hop limits, and result shape. The return-value enumeration exceeds what is strictly required given the output schema exists, so nothing an agent needs is missing.

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?

There is a single parameter with 100% schema description coverage, so the schema already explains the format and the bare-domain-means-https rule. The description only adds "Pass the address" plus the public/standard-port constraint, which mostly repeats the schema, so the baseline of 3 applies.

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?

"Traces the redirects and headers of a web address" names a specific verb and resource, and the follow-up (final address, https upgrade, hop status codes) pins down exactly what kind of tracing. This clearly separates it from siblings like check_page_tags or link_sample_check, which do not follow redirect hops.

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

Usage Guidelines5/5

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

The description gives both positive triggers ("where a web address redirects to", "301 redirect chain") with three concrete user-utterance examples, and explicit exclusions (private/local addresses, reading page content, vulnerability scanning). An agent has everything it needs to decide for or against this tool.

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.