Skip to main content
Glama

Frontman for WordPress

wp_update_block

Destructive

Replaces a Gutenberg block at a given index in a post with new block markup.

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>",
      "post_id": "<post_id>",
      "block_markup": "<block_markup>"
    },
    "name": "wp_update_block"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoRaw block-tree path returned by wp_list_blocks. Use this for nested blocks.
indexNoZero-based index of the block to replace.
post_idYesThe post ID containing the block.
site_idYesThe connected site's id returned by list_sites. Call list_sites first; do not use a URL or WordPress post ID.
block_markupYesThe new block markup (HTML with Gutenberg block comments, e.g. <!-- wp:paragraph --><p>Hello</p><!-- /wp:paragraph -->).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=false and openWorldHint=true, so the safety profile is covered. The word "Replaces" reinforces that existing block content is destroyed, but the description adds no detail on whether the old block markup is recoverable or what happens to sibling blocks after the swap.

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?

A single front-loaded sentence with no filler. It is efficient, though so terse that it omits the addressing caveat that would have made it more useful at negligible length cost.

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

Completeness3/5

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

A destructive mutation tool with no output schema and fully documented parameters, so the schema and annotations carry most of the load. The description stops short on index-versus-path precedence and on what the call returns, which an agent editing nested blocks would need.

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 coverage is 100%, so all five parameters are documented in structured data, giving a baseline of 3. The description references index-based addressing but does not clarify how index relates to the alternative path parameter for nested blocks, which is the one semantic gap the schema leaves ambiguous.

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?

Names a specific verb and resource: "Replaces a Gutenberg block at a given index in a post with new block markup." An agent can distinguish this from wp_delete_block or wp_insert_block by the verb alone, though the description never explicitly contrasts them.

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

Usage Guidelines2/5

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

No when-to-use or when-not-to-use guidance and no mention of alternatives such as wp_insert_block for additions or wp_move_block for reordering. The only prerequisite (call list_sites first) lives in the schema's site_id description, not the tool description.

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.