Skip to main content
Glama

Restore a revision

wp_restore_revision
Destructive

Restore a WordPress post to a chosen revision by ID, copying its title, content, excerpt, and registered meta; terms and status stay unchanged.

Instructions

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).

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. Addedv4.10.0

TDQS

A4.6/5.0
Behavior5/5

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

The description provides highly detailed behavioral traits beyond annotations, including: which data fields are copied (title, content, excerpt, meta), which are static (terms, status), required permissions (edit_posts), error conditions (unknown revision id), and specific system side effects (No AlphaBridge undo point, replaced version remains in wp_list_revisions).

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?

The description is dense but effective, front-loading the core functionality before detailing constraints, data flow, and technical metadata. While lengthy, every sentence provides critical functional detail.

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?

Given the complexity of WordPress, the description is exceptionally complete. It covers data mapping (what is copied/what is not), permission requirements, system-level side effects, and specific error handling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Since the schema description coverage is 100%, the schema already explains that `revision_id` is the ID from wp_list_revisions. The description reiterates this context but adds no novel semantic meaning to the parameter itself.

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?

The description explicitly states the purpose: 'Restore a post to one of its revisions.' It clearly differentiates this specialized function from a general update by specifying revision-based restoration.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for usage. It implies that this tool is necessary when a previous state of the content needs recovery, and by detailing exactly what is restored, it guides the user on when this tool is appropriate compared to a general `update` action.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools