Governed ability

Restore revision

aafm/restore-revisionGuarded write

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

Restore a post to one of its revisions. This call takes no snapshot of its own: the current state stays recoverable only if WordPress already kept it as the post's latest revision, which is normal while revisions are on. Refused when revisions are disabled for the post, since the current state could then not be kept and the restore would be irreversible. Also refused when the post is owned by a page builder (Elementor, Divi, Beaver Builder, Avada, Visual Composer, Oxygen, Breakdance, Brizy, Bricks, and WPBakery), since the restore would either have no visible effect or corrupt the builder's stored markup, except an Avada or WPBakery page while that builder is active: those keep the whole layout in the post content. An Avada or WPBakery restore, including one of a builder's own content types, is refused when saving the revision as this user would change it or the current page, for example by removing an element or an embed the user may not keep. So is a revision made with the other builder, for example a WPBakery revision of a page Avada owns now. After a WPBakery restore the page's generated CSS is rebuilt; if that fails the tool says the CSS may be stale.

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, Restore revision ships switched off. You turn it on one at a time, and an update never switches on a tool it serves.

  • Guarded write

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

  • Capability gated

    A connection only sees Restore revision 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.

Restore revision is one of the 30 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
YouRestore revision on this site.
RunRunning aafm/restore-revision
GateAllowedcapability re-checked before running
Auditaafm/restore-revision · 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. Restore post 142 to revision 990.
  2. Roll the About page back to its previous revision.
  3. Bring post 88 back to the version from before the last edit.

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 Restore revision.

Do I lose the current version?

Usually not. Restore revision takes no snapshot of its own, but while revisions are on WordPress has normally kept the current version already as the post's newest revision. When revisions are off for the post, the tool refuses, because the current version could not be kept.

Does it work on Avada or WPBakery pages?

Yes, while that builder is active, because both keep the whole layout in the post content. It is refused when saving the revision as this user would change it or the current page, or when the revision was made with the other builder, and after a WPBakery restore the page's generated CSS is rebuilt. Pages owned by any other page builder are still refused.

Is it enabled by default?

No, Restore revision is off until enabled, requires edit access to the post, and is logged.

Back to all abilities

Governed by default, from the first call.

Restore revision 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.