Skip to main content
Glama

Plan the 301 redirects for a migration

plan_redirects
Read-onlyIdempotent

Match old URLs to new ones for a site migration or restructure and write the redirect rules. Give the old URLs (a list, or the old site's address while it is still online) and the new URLs (a list, or the new site's address so OnPage.dev reads its sitemap). Each old URL gets the best new match with a confidence score, unmatched ones are flagged with a suggestion, and the rules come out ready for Cloudflare or Netlify (_redirects), nginx, Apache (.htaccess), Next.js or CSV. After going live, verify with check_urls using the new URLs as expected.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput format, default redirects (Cloudflare Pages and Netlify).
new_siteNoNew site address, to read its sitemap instead of new_urls.
new_urlsNo
old_siteNoOld site address, to read its sitemap instead of old_urls.
old_urlsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rulesYes
reviewNo
matchedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/openWorld/non-destructive, and the description adds genuinely new behavioral detail: per-URL confidence scoring, flagging of unmatched URLs with suggestions, and concrete output formats. The phrase 'write the redirect rules' is slightly at odds with readOnlyHint, but since the rules are emitted as text rather than applied, this reads as generation, not mutation.

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?

Purpose is front-loaded in the first clause, followed by inputs, output behavior, and the verification handoff. The single long first sentence is dense but every clause carries information; only minor trimming would be possible.

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-value explanation is not strictly required, yet the description usefully summarizes the output shape (confidence scores, flagged unmatched URLs, format choices). Combined with annotations, an agent has enough to invoke it correctly, with only the input-precedence rule (list vs site) left implicit.

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?

Schema coverage is 60%, and the description compensates by explaining that old/new URLs can be supplied either as a list or as a site address whose sitemap will be read. It also ties the 'redirects' format to Cloudflare Pages and Netlify (_redirects), adding meaning beyond the enum label.

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: matches old URLs to new ones and generates 301 redirect rules for migrations/restructures. It is distinguishable from siblings, and it explicitly names check_urls as the post-live verification step, so the agent can route correctly.

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?

Gives clear context for when to use it (site migration or restructure) and routes the agent to check_urls for post-deployment verification. It lacks an explicit 'when not to use' clause, but the alternative and its condition are stated, which is close to full coverage.

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.