Skip to main content
Glama

Frontman for WordPress

wp_update_template

Destructive

Updates the content of a template or template part. Reads the current version first and returns before/after snapshots.

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": {
      "site_id": "<site_id>",
      "slug": "<slug>",
      "content": "<content>"
    },
    "name": "wp_update_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugYesThe template or template part slug.
typeNoThe template type to update.wp_template
titleNoOptional updated human-readable title.
contentYesThe new template markup.
site_idYesThe connected site's id returned by list_sites. Call list_sites first; do not use a URL or WordPress post ID.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Adds real behavioral context beyond the annotations: it reads the current version first and returns before/after snapshots, which tells the agent this is a safe-to-inspect mutation and gives it recovery information. The annotations already declare destructiveHint=true, openWorldHint=true and idempotentHint=false, so the description sensibly spends its words on the read-then-write and snapshot behavior rather than repeating the safety profile. It still does not say whether content fully overwrites prior markup or how the destructive change is surfaced.

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 short sentences, front-loaded with the core action, with the behavioral detail second. Nothing is redundant or padded.

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 mutation with no output schema, the description covers the essential behavior: it validates the current state and returns before/after snapshots, so the agent knows what comes back. The remaining gap is the replacement-vs-merge semantics of the content field, which matters for a destructive write.

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 every parameter is already documented in the schema, including the site_id instruction to call list_sites first and the type enum default. The description adds no meaning beyond that – notably it does not clarify whether 'content' replaces the entire template markup or merges. Baseline 3 applies when the schema does the heavy lifting.

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?

States a specific verb and resource ('Updates the content of a template or template part'), so the agent can distinguish it from wp_read_template or wp_create_template by name alone. It does not explicitly name a sibling to route against, which keeps it short of a 5.

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?

Usage is only implied: 'updates the content' signals an existing resource must already exist, and the site_id param directs the agent to call list_sites first. There is no explicit statement of when to use this versus wp_create_template or wp_update_block, and no note on whether the template must pre-exist or what happens if the slug is wrong.

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.