Skip to main content
Glama

Restore a revision

wp_restore_revision
Destructive

Restore a post to one of its revisions: WordPress copies the revision's title, content and excerpt, and meta a plugin registered as revisioned, back onto the post; a new revision can result where revisions are on and the content differs. Terms and status stay as they are. Returns restored and post_id. Needs edit_posts and the right to edit that post; an unknown revision id is a not-found error. No AlphaBridge undo point is recorded; the replaced version normally remains in the post's revision list (wp_list_revisions). Forwarded by AlphaBridge Connect to the one site this connection reaches.

Input Schema

NameRequiredDescriptionDefault
revision_idYesRevision id, as wp_list_revisions returns it; the post it belongs to follows from the revision.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / revision_id / description
      Added value: +"Revision id, as wp_list_revisions returns it; the post it belongs to follows from the revision."
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: it spells out the exact fields overwritten, that terms and status are left alone, that a new revision may be created, that no AlphaBridge undo point is recorded, and that the replaced version normally survives in the revision list. It also discloses the required capabilities, the error case, and the return fields, which the annotations alone do not convey.

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?

Front-loaded with the action and its effects, then permissions and error behavior, so an agent can stop reading early. It is a single dense paragraph with a couple of clauses (the AlphaBridge framing, the undo caveat) that could be tightened, but no sentence is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive one-parameter mutation with rich annotations and no output schema, the description covers effects, side effects, permissions, error behavior, and return values. Nothing an agent needs in order to call it correctly is missing.

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?

Only one parameter and the schema already documents it at 100% coverage. The description still adds the useful inference that the post follows from the revision, so no post id is needed, and ties the id back to wp_list_revisions.

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 ('Restore a post to one of its revisions') and immediately enumerates what is copied, which distinguishes it from the sibling wp_update_post. It also names wp_list_revisions as the way to see the revision list, giving an agent a clear placement among siblings.

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?

Clear context: use this to roll a post back to a stored revision, with wp_list_revisions named for inspecting the revision list afterwards. Preconditions (edit_posts plus the right to edit that post) and the not-found failure for an unknown id are stated. It stops short of explicitly excluding alternatives such as restoring by editing the post directly.

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.

Resources