Skip to main content
Glama

Reset a customised template

reset_template_customization
Destructive

Revert a Site Editor template customization to the theme's file version by deleting the database copy. Preview the change with a dry run, then confirm with a token to apply.

Instructions

Revert a template or template part that was edited in the Site Editor back to the theme's file, by deleting the database copy (DELETE /wp/v2/templates/{id}?force=true). Only works on items whose source is "custom" — find them with diff_global_styles. Without confirm_token it is a dry run that shows what would be lost; if the item was created in the Site Editor and has no theme file, deleting removes it entirely, and the preview says so.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTemplate id as "theme//slug", e.g. "twentytwentyfive//single".
kindNoWhether the id names a template or a template part.template
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.
confirm_tokenNoToken from this tool's dry-run preview. Omit to preview.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.6/5.0
Behavior5/5

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

It discloses the destructive mechanism (DELETE /wp/v2/templates/{id}?force=true), the dry-run behavior without confirm_token, and the edge case where a Site Editor-created item with no theme file is removed entirely. This is substantial context well beyond the destructiveHint=true annotation.

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?

Two dense, front-loaded sentences carry all the essential information: action, mechanism, applicability condition, dry-run flow, and edge case. No filler or repetition.

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?

For a destructive tool with no output schema, the description covers the confirmation flow, the candidate constraint, and the worst-case outcome. It stops short of describing the exact response format after confirmation, but the essential operational context is complete.

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?

The schema already covers all four parameters with 100% description coverage, but the description adds meaning around confirm_token by explaining the dry-run preview and what would be lost. It also clarifies the candidate condition for the id/kind parameters, going slightly above baseline.

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 states a precise action: 'revert a template or template part ... back to the theme's file', and names the exact resource and mechanism (deleting the database copy). The 'source is custom' qualifier further distinguishes it from ordinary read/update template tools.

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?

It clearly gives the condition under which the tool applies: 'Only works on items whose source is custom', and it points the agent to diff_global_styles for finding candidates. It does not explicitly name a 'when not to use' alternative like update_template, but the intended use case is clear.

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