Governed ability

Test a URL against the redirects

aafm/site-test-redirectRead only

Test a URL against the redirects is a governed Redirects ability in Agent Abilities for MCP, a free WordPress plugin that runs an MCP server on your site.

Works out which stored redirect a URL on this site would hit, without requesting the URL and without changing any hit counter or log, then follows the redirects it can see for up to ten steps and says whether they end, leave the site or form a loop. It checks the supported redirect plugins in the order they were seen to run and reports what each one said. It is a simulation with limits: it does not see server rules, WordPress's own redirects, a CDN, or redirect plugins it does not support, which it names when it finds them, so the answer is never complete. Some redirects come from a plugin setting rather than a stored rule: a 404 fallback, attachment, author or date archive redirects, a redirect for a changed slug, a www redirect, a site move, a permalink migration or an old category base. For these the tool uses this site's own permalink rules to work out what kind of page the address is. A setting that applies gives a match that names the setting instead of a rule id; a setting that cannot apply is ignored. When the address cannot be classified, or another plugin has hooked the redirect plugin's filters, that plugin answers unknown with a reason naming the setting and a hint to request the address without following redirects. That request is the only sure check. When other plugins hook WordPress's request handling and could serve a page WordPress alone would not find, a setting for pages not found also answers unknown. Other pages are judged as WordPress alone would judge them. A redirect of a page not found that WordPress's own redirect may answer first is marked approximate. Conditional and pattern redirects are evaluated by each plugin's own matcher where it has one and are otherwise unknown. It changes nothing. Requires the manage-options capability.

How it is governed

The same model as every ability in the plugin, stated for this one.

  • Off until you enable it

    Like every ability, Test a URL against the redirects ships switched off. You turn it on one at a time, and an update never switches on a tool it serves.

  • Reads only

    It reads data and returns it to your client. Nothing on your site is created, changed, or removed.

  • Capability gated

    A connection only sees Test a URL against the redirects if the user you connected can run it, and the plugin checks that capability again before it executes.

  • Every call audited

    The call is written to the log in your own database, denials included, with the argument keys and the identifiers it touched, never free-text content.

Test a URL against the redirects is one of the 4 governed Redirects abilities. See the full Redirects MCP integration.

See it in action

An illustrative run. Your real calls and data stay on your own site.

agent-abilities · auditGoverned
YouTest a URL against the redirects on this site.
RunRunning aafm/site-test-redirect
GateAllowedread capability confirmed
Auditaafm/site-test-redirect · principal: editor · args: id
ResultReturns the data the agent asked for. Nothing on the site changes.

Try it with a prompt

Example requests you could paste to your agent.

  1. Which redirect would /old-shop/ hit, and where does the chain end?
  2. Is there a redirect loop starting at /blog/?

These are illustrative example prompts. The agent runs them as the user you connected, checked against that user's capabilities and written to your audit log.

Frequently asked

Short answers for Test a URL against the redirects.

Does it request the URL?

No. Test a URL against the redirects works out which stored redirect the URL would hit without requesting it and without changing a hit counter or log, then follows the redirects it can see for up to ten steps.

Is the answer complete?

Never quite. It does not see server rules, WordPress's own redirects, a CDN or redirect plugins it does not support, and it names those when it finds them.

Back to all abilities

Governed by default, from the first call.

Test a URL against the redirects is off until you enable it, scoped to the user you connect, and logged like everything else. Turn on only what you need.

Every ability off until you enable it, capability-gated on every call.