Create redirect
create_redirectCreate a Shopify URL redirect. Preferred: pass brokenLinkId (from list_broken_links, internal links only) plus target, which also marks the broken link fixed. Or pass path + target directly. Targets must be an existing page on the store (or '/'); redirects into another 404 are refused.
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": "create_redirect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Broken path, e.g. /products/old-handle (when no brokenLinkId) | |
| target | Yes | Where to send visitors, e.g. /products/new-handle or / | |
| brokenLinkId | No | Fix this broken link (preferred) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| path | Yes | ||
| target | Yes | The target that was requested | |
| created | Yes | False when the path already had a redirect and nothing changed | |
| message | Yes | What to tell the merchant | |
| existingTarget | No | Where the path already redirected; present only when created is false | |
| existingTargetUnknown | No | A redirect existed but Shopify didn't reveal its target |