Skip to main content
Glama

Update a block template

update_template

Update a WordPress block template or template part's markup to take effect site-wide immediately, storing changes in the database so the theme file remains untouched.

Instructions

Update a block template or template part's markup. This changes the layout of every page that uses it, so it takes effect site-wide immediately. WordPress stores the customisation in the database, leaving the theme's own file untouched — you can always revert in the Site Editor.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTemplate id, e.g. "twentytwentyfour//single".
kindNoWhether the id names a template or a template part.template
titleNoNew template title.
contentYesFull block markup for the 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.
descriptionNoNew template description.
Behavior4/5

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

Annotations only indicate non-read-only and non-destructive. The description adds valuable behavioral detail: the change applies site-wide immediately, is persisted in the database, leaves the theme file untouched, and is reversible from the Site Editor. This goes beyond the structured fields and gives the agent a clear mental model of side effects and reversibility.

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 two sentences with no redundant phrasing. The primary action is front-loaded, followed by the most important consequence (site-wide effect) and storage/reversibility details. Every sentence earns its place, and there is zero fluff.

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 mutation tool with 6 parameters and no output schema, the description covers the key context: what it does, its scope, persistence, and reversibility. It does not mention the return value or error conditions, which could be useful, but these are often implicit for update operations. The description is sufficiently complete for correct invocation.

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?

Schema description coverage is 100%, so all six parameters are already documented in the input schema. The description itself adds no parameter-specific guidance (e.g., expected formatting of 'content' or how 'kind' interacts). Per the rubric, a baseline of 3 is appropriate when the schema fully carries parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear action ('Update a block template or template part's markup') and a specific resource. It correctly distinguishes template from template_part, though it does not explicitly contrast with sibling tools like update_global_styles. The verb and object are unambiguous, so an agent can determine what the tool does without opening the schema.

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

Usage Guidelines3/5

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

The description implies usage context: it notes the site-wide effect and that customization is stored in the database rather than the theme file, suggesting it is preferred over direct file edits. However, it never explicitly names an alternative or states when not to use it. The 'when to use this vs. something else' guidance is left to inference.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alokemajumder/wpxmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server