Skip to main content
Glama

mcp-easy-ai__wp_get_post_blocks

Read-only

Returns the Gutenberg block tree of a post, page or custom post type item as structured data instead of raw markup — read this before editing blocks with wp_update_post_blocks. Required: post_id. Optional: post_type (REST base, default posts; e.g. pages), depth (levels to expand, default 2, max 10), path (dot-joined zero-based indexes such as 0.2.1; returns only that subtree). Paths count addressable blocks only: named blocks and non-empty classic HTML (reported as core/freeform); the whitespace gaps between blocks are skipped, so three paragraphs are 0, 1, 2. Returns { post_id, block_count (root blocks), blocks: [{ path, name, attrs, inner_html_preview (first 160 chars of the block's own HTML), children_count, children | has_children }] } — children is present within depth, beyond it has_children is set instead. Reads the raw content with edit context, so the same edit_post check as the editor applies. For synced patterns (wp_block posts) use wp_get_block. Through Royally: its server marks it read-only, so it runs straight away.

Input Schema

NameRequiredDescriptionDefault
pathNoDot-joined zero-based path of one block, e.g. "0.2.1". Returns only that block and its subtree; depth counts from it.
depthNoHow many levels of nested blocks to expand (1 = root blocks only). Default 2, max 10.
post_idYesThe ID of the post whose blocks to read.
site_idNoSite to run this tool on: 8ef2e52b-bd07-4671-a363-ebe8b480b65c (https://demo.royalplugins.com)
post_typeNoREST base of the post type (default "posts"; e.g. "pages", "product"). A post_type slug is also accepted.posts

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint annotation: it discloses that the raw content is read with edit context, so the `edit_post` capability check applies — a real auth prerequisite. It also explains path addressing semantics (non-empty classic HTML counted as `core/freeform`, whitespace gaps skipped) and notes the Royally server marks it read-only so it runs without approval.

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 with purpose and the sibling routing, then parameters, then the return shape. It is dense but nearly every clause carries information; the inline return-shape enumeration is doing necessary work given no output schema exists.

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

Completeness5/5

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

With no output schema, the description supplies the full return contract (post_id, block_count, blocks array fields, children vs has_children beyond depth). Combined with permission disclosure and sibling routing, an agent has everything needed to call and interpret it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds genuine meaning: `path` is defined as addressable-block indexes (three paragraphs = 0, 1, 2) and `depth` semantics interact with `path` ('depth counts from it'). That is more than the schema states, though `post_type` REST-base nuance is only echoed.

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?

Opens with a specific verb and resource: 'Returns the Gutenberg block tree of a post, page or custom post type item as structured data instead of raw markup.' It distinguishes itself from wp_update_post_blocks (write path) and wp_get_block (synced patterns), so an agent can select it without opening schemas.

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

Usage Guidelines5/5

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

Explicitly states 'read this before editing blocks with `wp_update_post_blocks`' and routes synced patterns (wp_block posts) to `wp_get_block`. Both a when-to-use and a when-to-use-something-else are named, which is more than most definitions offer.

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.

Resources