Skip to main content
Glama

bricks_patch_page

Apply partial updates to a Bricks Builder page by sending only changed elements, with automatic backup and optimistic locking to prevent overwriting concurrent edits.

Instructions

Apply partial updates to a page. Only sends changed elements instead of full page data. More efficient than bricks_update_page for small changes. Automatically creates a backup before writing (plugin-side, cannot be skipped). Supports optimistic locking via content_hash. Use content_area to patch header or footer. THEME-FIRST: when adding or restyling elements, reuse existing theme tokens and global classes (bricks_get_theme_styles / bricks_list_global_classes) instead of inline styling; prefer settings.style and _typography over _cssCustom, and the text-link/button elements over styled divs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addNoNew elements to add
removeNoElement IDs to remove
updateNoElements to update (must include id, only changed settings needed)
page_idYesPage ID
content_areaNoWhich content area to patch (default: content).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 patch fails with 409 if that area changed since you read it.
regenerate_cssNoWhether to regenerate CSS after patching (default: true)

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, patch 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 patch fails with 409 if that area changed since you read it."
  2. First observedv1.2.3

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries full behavioral burden and does so well: it discloses an automatic, non-skippable plugin-side backup, optimistic locking via content_hash with per-content-area scoping, and a 409 failure mode on conflict. These are exactly the traits an agent needs before mutating a page.

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 purpose and efficiency rationale, then backup/locking behavior, then the theme-first policy. Every section is relevant, though the trailing theme/global-class styling block is a longer policy preamble that slightly dilutes focus.

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 7-parameter mutation tool with no output schema, the description covers backup, locking, conflict handling, content-area targeting, and styling conventions. Return value details are appropriately omitted (no output schema), though pagination/response confirmation is not described.

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 the schema already elaborately documents content_hash, content_area, and regenerate_css (including locking semantics). The description adds little beyond the schema apart from a brief note to use content_area for header/footer, so the baseline 3 applies.

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 ('Apply partial updates to a page') and further scopes it ('only sends changed elements instead of full page data'). It explicitly differentiates itself from the sibling bricks_update_page, so an agent can choose between them without opening either schema.

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?

Names the alternative (bricks_update_page) and the condition that selects it ('for small changes'), plus reminds the agent to route header/footer edits through content_area. It also adds a clear usage policy for styling (reuse theme tokens/global classes). This is explicit when/when-not guidance.

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