Governed ability

Replace sitewide

aafm/replace-sitewideGuarded write

Replace sitewide is a governed ability in Agent Abilities for MCP, a free WordPress plugin that runs an MCP server on your site.

Literal find-and-replace across multiple posts, scoped by post type and status. Dry-run by default (previews the match count and which posts would change, writes nothing); pass dry_run:false to apply. Each candidate post is guarded by the same structure-preserving check as replace-in-post, so a match landing inside markup is skipped and reported, not applied. A candidate owned by a foreign page builder is likewise skipped and counted in skipped_builder_owned, not applied. Bounded to 50 posts per call; a larger match set reports truncated:true with the real total. New in 1.7.4.

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, Replace sitewide ships switched off. You turn it on one at a time, and an update never widens access on its own.

  • Guarded write

    Writes stay conservative, and the plugin re-checks the capability before the call runs.

  • Capability gated

    A connection only sees Replace sitewide 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.

Replace sitewide is one of the 27 governed Content abilities. Browse the other Content abilities in the catalog.

See it in action

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

agent-abilities · auditGoverned
YouReplace sitewide on this site.
RunRunning aafm/replace-sitewide
GateAllowedcapability re-checked before running
Auditaafm/replace-sitewide · principal: editor · args: post_id
ResultApplies the change, then writes the call to the audit log.

Try it with a prompt

Example requests you could paste to your agent.

  1. Preview what would change if I replaced our old company name with the new one across every published post.
  2. Do a dry run of replacing 2025 with 2026 across the pages, and tell me how many posts match.
  3. Apply the phone number correction across the published posts now that I have seen the preview.

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 Replace sitewide.

Does it write straight away?

No. Replace sitewide is a dry run by default: it previews the match count and which posts would change, and writes nothing. You have to pass dry_run:false to actually apply it.

How many posts can one call touch?

Replace sitewide is bounded to 50 posts per call. A larger match set comes back with truncated:true and the real total, and there is no continuation parameter yet, so narrow the scope by post type or status to work through a bigger set.

What does it refuse to touch?

Replace sitewide uses the same structure preserving check as Replace in post, so a match landing inside markup is skipped and reported rather than applied. A post owned by a foreign page builder is skipped too and counted in skipped_builder_owned, since a write there would look successful but change nothing visible.

Back to all abilities

Governed by default, from the first call.

Replace sitewide 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.