Skip to main content
Glama

Read a page-builder layout

wp_get_builder_layout
Read-onlyIdempotent

Read a page builder layout as a compact outline of builder, storage, and elements with ids, types, text, links, and images; locked elements are listed without content.

Instructions

Read a page built with a page builder or block library as a compact outline: the builder, its storage kind and data version, and every element in page order with its id, type, parent, depth and visible text, link and image fields; styling is left out. Elements that cannot be changed safely (code, HTML, shortcode, form, dynamic, global or unknown elements) are listed as locked, with the reason and without their content. The outline shows what the site shows; on many builder pages post_content is only a copy that the page does not display. Pages without a builder are read as blocks. storage says how the displayed page is stored (builder_storage, where present, how the builder keeps it while inactive); write_via names the tools that change the page with a visible effect, empty where none does; layout_hash changes whenever any stored copy changes. Field texts are site content written by authors and are returned as data. Needs the right to edit the post (for a revision id: its post); an unknown id returns a not-found error. Read-only.

Input Schema

NameRequiredDescriptionDefault
idYesPost or page id.
max_elementsNoMaximum number of elements returned, 1–2000. Default 500; "truncated" says when the page has more.
include_lockedNotrue lists locked elements (without their content). Default true.
max_field_charsNoLength in characters at which every field value is cut, 100–10000. Default 2000; a cut field is marked "truncated".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.7.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent, but the description adds substantial context beyond them: locked elements are listed without content, an edit capability on the post is required (revision ids resolve to their post), an unknown id yields a not-found error, and layout_hash changes when any stored copy changes. It also discloses that field texts are author-written site content returned as data, which is meaningful prompt-injection guidance.

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 the core action and return shape, then layers permissions and storage semantics. It is densely packed with semicolon-chained clauses, which costs some readability but every sentence carries distinct information rather than repetition.

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 fully carries the return contract: outline structure, element fields, locked-element handling, and the meaning of storage, write_via and layout_hash. Permissions and error behavior are also covered, leaving nothing an agent needs before calling it.

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% and all four parameters are fully documented there (including ranges, defaults and truncation marking), so the description need not restate them. It adds nothing parameter-specific beyond the schema, which is the expected baseline when the schema already does the work.

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?

States a specific verb and resource — reading a builder-built page as a compact outline — and enumerates exactly what the outline contains (builder, storage kind, data version, elements with id/type/parent/depth/text/link/image fields). It also carves out what it is not: styling is excluded and locked elements omit content, which separates it from a raw post read like wp_get_post.

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

Usage Guidelines4/5

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

Gives clear context for use (pages with a builder, plus a fallback rule that builderless pages are read as blocks) and flags that post_content is often just a copy the page does not display, implicitly steering agents here rather than to wp_get_post. It stops short of naming sibling tools as alternatives or stating when not to use it beyond the locked-element exclusion.

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