Skip to main content
Glama

bricks_update_page

Update Bricks Builder page data with automatic backup and JSON validation. Supports optimistic locking via content_hash to prevent overwriting concurrent changes to content, header, or footer areas.

Instructions

Update the Bricks Builder data for a page. Automatically creates a backup before writing. Validates the JSON structure before saving. Supports optimistic locking via content_hash. Use content_area to write header or footer template data. THEME-FIRST: before generating elements, call bricks_get_theme_styles and bricks_list_global_classes — reuse existing tokens (button styles, utility classes, color palette) instead of inline styling. For buttons prefer settings.style: "primary"|"secondary" over manual _background/_typography. For links use the text-link element, not a styled text-basic. Use _cssCustom only for what settings cannot express.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_idYesWordPress page/post ID
bricks_dataYesArray of Bricks elements to save
content_areaNoWhich content area to write (default: content). Use header/footer to manage template elements.content
content_hashNoContent hash for optimistic locking, from bricks_get_page. Locking is per content_area: for header/footer use content_hashes.header / content_hashes.footer, NOT content_hash (that is the content area). If provided, the update fails with 409 if that area changed since you read it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.3.0
    • changedInput schema / properties / content_hash / description
      Previous value: -"Content hash from bricks_get_page for optimistic locking. If provided, update fails with 409 if page was modified since read."New value: +"Content hash for optimistic locking, from bricks_get_page. Locking is per content_area: for header/footer use content_hashes.header / content_hashes.footer, NOT content_hash (that is the content area). If provided, the update fails with 409 if that area changed since you read it."
  2. First observedv1.2.3

TDQS

A4/5.0
Behavior4/5

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

Discloses automatic backup before writing, JSON structure validation, and optimistic-locking behavior with a specific 409 failure mode. These are important behavioral traits not covered by any annotations. Doesn't describe return values, but no output schema exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and behavior, then shifts into a lengthy THEME-FIRST directive with multiple style prescriptions. The style guidance is valuable but bloats a tool definition that is primarily about the write operation; some of it reads like a design guidelines document.

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 mutation tool with no annotations and no output schema, it covers the key prerequisites (theme styles, global classes), the safety net (auto backup), and a failure mode (409). Missing only guidance on the expected bricks_data element format.

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 the schema already documents all four parameters including the locking semantics and enum values. The description adds little parameter-level detail beyond echoing content_area's purpose; baseline 3 is appropriate.

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 (Update) and resource (Bricks Builder data for a page), and extends scope with the content_area parameter for header/footer template data. Distinguishes from siblings like bricks_patch_page and bricks_append_elements by being the full-write operation.

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?

Provides clear context on when to use content_area vs default content, and prescribes a workflow (call get_theme_styles and list_global_classes first). It doesn't name competing siblings like bricks_patch_page, but the when-to-use rules for buttons, links, and _cssCustom are strong.

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