Skip to main content
Glama

Shopify SEO Expert: Digital Darts

Replace a broken link

replace_link
Destructive

Edit a broken link's href in the store's content so it points somewhere that works. This is the fix for an EXTERNAL broken link (a redirect can't help there) and the better fix for an internal one when the right page exists. Preview with preview_link_replacement first and get the merchant's go-ahead. Navigation menus can't be rewritten by the app.

Input Schema

NameRequiredDescriptionDefault
newHrefYesThe URL or path the link should point at
brokenLinkIdYesFrom list_broken_links

Output Schema

NameRequiredDescriptionDefault
okYes
messageYes
failuresNo
remainingYesPages the time budget did not reach. Greater than zero means the fix is INCOMPLETE — call this tool again with the same arguments to continue.
resourcesChangedYes
occurrencesReplacedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, openWorldHint=true, idempotentHint=false and readOnlyHint=false, so the safety profile is covered. The description adds genuine beyond-schema context: this rewrites live store content, requires a preview and merchant approval before acting, and has a hard scope limitation (navigation menus are not rewritable). It stops short of describing reversibility of the edit.

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?

Four tight sentences with zero filler: core action first, then routing versus redirects, then the required preview/approval workflow, then the scope limitation. Each sentence carries distinct decision-relevant 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?

An output schema exists, so return values need no explanation. For a destructive mutation tool the description supplies purpose, alternative routing, prerequisite workflow, approval requirement, and scope limits – everything an agent needs to invoke it correctly.

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% with only two parameters, so the schema already documents newHref ('URL or path the link should point at') and brokenLinkId ('From list_broken_links'). The description adds no syntax or format guidance beyond that, so the baseline 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?

States a specific verb and resource (edit a broken link's href in store content) and immediately distinguishes itself from create_redirect by declaring this is the fix for an EXTERNAL broken link where 'a redirect can't help there'. An agent can route between replace_link and create_redirect without opening either schema.

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?

Gives explicit when-to-use (external broken link; internal one when the right page exists), names the alternative that won't work (redirect), specifies the required prerequisite flow (preview_link_replacement first plus merchant go-ahead), and states a when-not constraint (navigation menus can't be rewritten).

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