Skip to main content
Glama

wp_blocks_replace

Replace a Gutenberg block with zero or more blocks in WordPress, using hash references to avoid overwriting stale content and supporting dry-run preview.

Instructions

Replace one Gutenberg block with zero or more blocks. Hash references prevent overwriting a block changed since it was read. Supports dry-run.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
atYes
refYesPost or page ID/slug
blocksYes
dry_runNoPreview changes without writing
post_typeNopage
allow_normalizationNoAllow saving when parse/serialize normalizes the original content
if_unmodified_sinceNoFail if modified_gmt changed since this timestamp

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.3.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the burden of behavioral disclosure. It adds meaningful context: hash references prevent overwriting a block changed since read, dry-run is supported, and replacement can produce zero blocks. This goes well beyond a bare mutation statement, though it stops short of explaining all failure and normalization behaviors.

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 sentences with no filler. The core operation is front-loaded, followed by two high-value behavioral details. Every sentence earns its place.

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?

The tool is a mutating operation with 7 parameters, no annotations, no output schema, and a complex selector parameter. The description covers the core operation and key safety features, but an agent would still need to rely heavily on the schema to understand selector semantics and preconditions. It is adequate but not fully self-contained.

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 57%, and the description adds some value by clarifying that 'blocks' can be zero or more and that 'hash' references are concurrency-protected. However, it does not explain the meaning of the at selector variants (path, anchor, name, query), which is a notable gap for a required, complex parameter.

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 opens with a precise verb and resource: "Replace one Gutenberg block with zero or more blocks." This clearly distinguishes the tool from siblings like insert, delete, update, or move, and even clarifies the zero-blocks edge case.

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?

There is no explicit guidance about when to use this tool instead of wp_blocks_update, wp_blocks_delete, wp_blocks_insert, or wp_blocks_move. The verb 'replace' implies the use case, but the description does not state conditions, exclusions, or alternatives.

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

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/leonardobora/mcp-wordpress'

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