Skip to main content
Glama

royal-mcp__wp_update_block_template

Destructive

Replace the block markup of a Site Editor template or template part on a block theme (ids from wp_list_block_templates, e.g. "twentytwentyfive//single"; type wp_template_part for parts). A template that comes from the theme's file is saved as a customised copy, as the Site Editor does; the file is not touched. Saved through WordPress's own templates endpoint. Copy the current markup from wp_get_block_template as a model. dry_run checks the markup without saving. Requires edit_theme_options. Returns an undo token: undo puts the earlier markup back, or removes the customisation when there was none; it refuses when the template was changed again since, unless force. (site: demo.royalplugins.com) Through Royally: waits for a person to approve it in Royally; nothing on the site changes until then.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>",
      "markup": "<markup>"
    },
    "name": "royal-mcp__wp_update_block_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesTemplate id, e.g. "twentytwentyfive//single".
typeNoDefault wp_template.
markupYesThe full new block markup of the template.
dry_runNo
site_idNoSite to run this tool on: 8ef2e52b-bd07-4671-a363-ebe8b480b65c (https://demo.royalplugins.com)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations it discloses the key mechanics: a theme-file template becomes a customised copy, the file itself is untouched, saving goes through WordPress's templates endpoint, edit_theme_options is required, and dry_run validates without saving. It also fully explains the undo token, including the removal-of-customisation case and the force override when the template changed again — behaviour no annotation conveys.

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 core action and its prerequisites are front-loaded, and most sentences carry distinct information (customisation model, permission, dry run, undo). It is dense and slightly cluttered by the trailing site/approval notes, but nothing is genuinely redundant.

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 5-parameter write with no output schema, it covers what an agent needs: required permission, dry-run option, source of ids and markup, side effects on theme files, and the undo/force model. The approval-gating note explains that nothing changes immediately, closing the loop on the mutation risk.

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?

Schema coverage is 80%, so the schema already documents id, type, markup and site_id, but the description adds concrete meaning for dry_run ('checks the markup without saving') and reiterates the id format and type usage in context. Marginal but real value beyond the structured fields.

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 names a specific verb and resource ('Replace the block markup of a Site Editor template or template part on a block theme') and scopes it clearly with example ids. It is distinguishable from siblings like wp_update_block_attributes, wp_replace_block and wp_update_synced_pattern because it explicitly targets Site Editor template/template-part records.

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 routes the agent to the right supporting tools: ids come from wp_list_block_templates, and the current markup should be copied from wp_get_block_template as a model. It also clarifies when to set type to wp_template_part. There is no explicit statement of when to prefer a different mutation tool, so it stops short of a full 5.

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