Skip to main content
Glama

Shopify SEO Expert: Digital Darts

Flatten a redirect chain

flatten_redirect_chain
DestructiveIdempotent

Point a chained redirect straight at its final destination, turning A → B → C into A → C. Takes a chainId from list_redirect_chains. A loop is refused (there's nothing sane to point at), as is a final destination that would itself 404.

Input Schema

NameRequiredDescriptionDefault
chainIdYesFrom list_redirect_chains

Output Schema

NameRequiredDescriptionDefault
okYes
pathYes
targetYesThe final destination it now points at
messageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare it is a destructive, idempotent, non-read write; the description goes beyond them by naming two refusal conditions (loops and destinations that would 404), which tells the agent what failures to expect. It does not explain whether intermediate hops are removed or whether permissions are required.

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?

Three short sentences, front-loaded with the concrete before/after example, then the ID source, then the failure modes. No filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values need no explanation, and the refusal conditions cover the main edge cases for a chain mutation. Minor gaps remain around the fate of intermediate hops and required permissions, but the essential contract is conveyed.

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?

Schema coverage is 100% and the single chainId is already documented as 'From list_redirect_chains', so the description's identical statement adds no new semantics. Baseline 3 applies when the schema carries the parameter burden.

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?

States a specific verb and resource plus the exact transformation ('turning A → B → C into A → C'), which lets an agent distinguish it from create_redirect and list_redirect_chains at a glance. The arrow notation makes the post-condition unambiguous.

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?

Explicitly says the chainId comes 'from list_redirect_chains', routing the agent to the discovery tool it must call first. It doesn't contrast against create_redirect for the case where no chain exists, but the precondition is clear.

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.

Resources