Skip to main content
Glama

WordPress: Wp blocks replace

wordpress_specialist_wp_blocks_replace
Destructive

Replaces a WordPress post's full block tree with a serialized block array, preserving HTML comment delimiters and sanitizing content unless raw HTML is allowed (max 200 blocks).

Instructions

[UNIFIED] Replace a post's full block tree. The companion serializes the array via WP's serialize_blocks() so HTML comment delimiters round-trip cleanly. Block content is sanitised with wp_kses_post unless raw_html=true (S-13: requires the WP user to also hold unfiltered_html). Capped at 200 blocks per call. Requires Airano MCP Bridge v2.13.0+ and edit_post on the target.

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": "<site>",
      "post_id": "<post_id>",
      "blocks": "<blocks>"
    },
    "name": "wordpress_specialist_wp_blocks_replace"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteYes
blocksYes
post_idYes
raw_htmlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.14.0

TDQS

A3.5/5.0
Behavior3/5

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

Relays implementation mechanics (serialize_blocks round-trip, wp_kses_post sanitisation, raw_html requiring unfiltered_html, 200-block cap, bridge v2.13.0+ and edit_post capability) that go beyond the annotations. However, the annotations already carry the safety profile (destructiveHint=true, readOnlyHint=false), and the description does not state what happens to the prior tree on failure, whether revisions are created, or what the call returns — the details most relevant to a destructive overwrite.

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?

Front-loaded action statement followed by dense, specific constraints; no filler sentences. Minor density cost from internal jargon ("S-13", "serialize_blocks()") that adds little for a caller.

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, 4-parameter tool with no output schema and 0% schema coverage, the description covers the risky mechanics well: sanitisation, opt-out, size limit, capability and version prerequisites. Remaining gaps are the site/post_id semantics and replacement/failure behavior, which keep it short of complete.

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 0%, so the description must carry the burden; it does explain the meaning and processing of blocks (serialized array, 200 cap) and raw_html (bypasses kses only with unfiltered_html). However, site and post_id get no format or expectation detail — notably what identifier form site accepts and whether post_id must be an existing non-revision post.

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?

"Replace a post's full block tree" gives a specific verb (replace) and resource (post's block tree) with a scope qualifier ("full") that distinguishes it from index-based siblings like wp_blocks_insert_at and wp_blocks_remove_at. It never names an alternative explicitly, so the differentiation is inferred from scope rather than stated.

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 through scope (whole-tree replacement, 200-block cap, edit_post requirement) but never says when to prefer this over partial mutation siblings, nor when not to use it. An agent must infer the alternative from the sibling names themselves.

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