Skip to main content
Glama

Restore a plugin option from backup

restore_plugin_settings
Destructive

Restore a WordPress plugin option to a previously saved value with preview and confirmation. Roll back a settings change that broke something.

Instructions

Restore an option to a value saved before an update_plugin_settings write. Every write keeps the last five previous values; by default this restores the most recent. The first call previews the current value next to the one that would be restored and returns a confirm_token; the second applies it. The current value is itself backed up first, so a restore is undoable. Use this to roll back a settings change that broke something.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
optionYesThe option name to restore.
site_idNoWhich configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids.
backup_indexNoWhich backup to restore (0 = oldest kept). Omit for the most recent.
confirm_tokenNoToken from the preview. Omit it first to see the current value next to the one that would be restored.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already provide readOnlyHint=false, destructiveHint=true, and idempotentHint=false. The description adds useful context: it describes the backup-retention behavior (last five values), the two-call flow that requires a confirm_token, and states that the current value is backed up first, making the restore undoable. This goes beyond annotations by explaining the mutation flow and safety net, which is valuable for an agent that might otherwise assume a simple immediate mutation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (three sentences) and well-structured: it starts with the core action, then provides the backup retention and two-step process, and ends with a clear use case. No fluff; each sentence adds critical information without redundancy. Front-loading the action and use case is effective.

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

Completeness4/5

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

Given the tool's complexity (two-step process, backups, safety), the description covers essential operational aspects: it explains the flow, the default, and the undoability. It doesn't explicitly mention return values or error handling, but there's no output schema, so agents must infer. It also doesn't discuss the backup_index semantics (0=oldest) which might be confusing, but the schema partly covers that. Overall, it's quite complete for the agent to call it correctly with the given schema and annotations.

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?

The schema already covers all parameters with descriptions (100% coverage). The description adds context about the two-call flow, which clarifies the confirm_token parameter's role, but it doesn't add additional semantic detail for option, site_id, or backup_index beyond what the schema says. Since the schema is comprehensive, a baseline of 3 is appropriate, and the description does provide slight illumination on confirm_token usage.

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 clearly states the action (restore), the resource (plugin option), and the source (backup taken before an update_plugin_settings write). It distinguishes itself from update_plugin_settings by describing a rollback use case. It's specific with verbs and resource context, making it easy for an agent to understand its unique role 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 Guidelines5/5

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

The description explicitly states when to use: 'Use this to roll back a settings change that broke something.' It also explains the two-step process (preview with token, then confirm) and that it defaults to the most recent backup. It implies an alternative (update_plugin_settings) but does not explicitly name it; however, the context is clear enough for an agent to select this tool appropriately.

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