Bricks
These abilities register when Bricks is detected on the site and a Pro licence is active. If either is missing the module stays absent rather than failing at call time.
At a glance
Bricks registers 49 abilities: 21 that only read, 21 that write, and 7 marked destructive. That split is the practical answer to how much of this module can run unattended. Reads cost nothing and are safe to repeat, so discovery is the part to be generous with; the writes are where review belongs, and the destructive calls stop for an explicit confirmation every single time regardless of which profile is active.
What this module is for
Use WPPilot Pro to work with Bricks content, elements, templates, components, global classes, theme styles, variables, dynamic data, and builder settings.
Before you rely on it: Treat template conditions, global classes, and theme styles as site-wide changes that deserve staging and approval.
Typical workflows
- Patch a specific element tree without replacing the whole page
- Create a reusable component and apply shared classes
- Inspect template conditions before changing a site-wide layout
The Bricks integration page covers the same module from the workflow side, with the capability map and the questions worth asking before a first write.
Availability on your site
The Bricks module needs three things at once: WPPilot Free as the MCP foundation, an active Pro licence, and the companion plugin detected on the site. Miss any one and the module does not register, which is deliberate: an ability that appears in the tool list but fails at call time is worse than an ability that was never offered. What the connected agent can actually call is then narrowed twice more: by the safety profile active on the site, and by the WordPress capabilities of the user behind the credential. A read that succeeds for an administrator can be absent entirely for an editor.
Every write these abilities perform is recorded in the change ledger, and destructive calls can be routed through the approval queue so a person signs off before anything is applied. A successful tool result means the operation returned, not that the front end, the cache, and every dependent template are correct: that still needs a look.
Reads
Available in every safety profile, including Read Only. Inspection costs nothing and is not rate limited.
| Ability | What it does |
|---|---|
wppilot/bricks-check-setupCheck Bricks Setup | Reports the Bricks environment status: license, supported post types, CSS loading mode, active theme, and version. Use this to diagnose builder availability issues. |
wppilot/bricks-get-color-palette-entryGet Bricks Color Palette Entry | Reads a single Bricks color palette entry by palette_id and color_id. Returns {palette_id, color_id, name, raw, light?, dark?} — light/dark appear on colors using the Bricks 2.2+ Color Manager format (dark-mode support). |
wppilot/bricks-get-contentGet Bricks Content | Retrieves the Bricks element tree for a given post or template. Returns the element data for one or all areas (header, content, footer). Each element is an associative array with id, name, parent, and settings. |
wppilot/bricks-get-global-classGet Bricks Global Class | Reads a single Bricks global class by its id. Returns id, name, settings, and category id when assigned. |
wppilot/bricks-get-settingsGet Bricks Settings | Retrieves Bricks settings. Pass a post_id to get page-level settings, or omit it to get global settings. |
wppilot/bricks-get-theme-styleGet Bricks Theme Style | Reads a single Bricks theme style by its id. Returns the full entry including id, label, and complete settings (per-element-type defaults plus conditions). Note: conditions are stored in settings.conditions.conditions (the outer key is the Bricks control group label; the inner array is the repeater). |
wppilot/bricks-get-variableGet Bricks Global Variable | Reads a single Bricks global variable by its id. Returns id, name, value, category. |
wppilot/bricks-list-color-paletteList Bricks Color Palette | Lists the Bricks color palette store. Returns all palettes with their colors nested: [{id, name, colors: [{id, name, raw|light, dark?}, ...]}]. Supply palette_id to return only that palette's colors as a flat list [{palette_id, color_id, name, raw, light?, dark?}]. Also returns dark_mode_ready: true when at least one color has a dark variant — the condition that makes Bricks native dark mode (the toggle-mode element) available in the builder (Bricks 2.2+). |
wppilot/bricks-list-componentsList Bricks Components | Lists Bricks components (reusable element definitions). Returns compact entries by default (id, label, category, root element name, element count). Pass verbose=true to include the full element tree per component — this can be large on sites with many components. |
wppilot/bricks-list-dynamic-dataList Bricks Dynamic Data | Lists the Bricks dynamic-data tokens registered in this environment, grouped by provider (wp / acf / metabox / pods / toolset / woo / jetengine / cmb2). Each entry is the exact {token} you paste into a Bricks setting. Use provider or search to narrow the output — an ACF-heavy site can expose hundreds of tags, so the default compact form caps at 300 and hints when to filter. verbose: true adds group/fieldType/deprecated flags and a single flat list of common output filters (:format:d/m/Y, :size:medium, @fallback:'...' — @-filters need a leading space). Bricks renders unknown tokens as their literal {text} — sanity-check with bricks-resolve-dynamic-data before embedding. |
wppilot/bricks-list-elementsList Bricks Elements | Lists registered Bricks elements. Use element="<name>" to get the control schema for one element, or include_controls=true to get controls for all. Controls are returned in a compact shape (type, label, group, description, value_format, options) by default — pass verbose=true for every field. Call once with include_shared_controls=true to discover the shared style controls (_padding, _margin, _typography, flex/grid, …) inherited by every element — they do not need to be re-fetched per element. |
wppilot/bricks-list-global-classesList Bricks Global Classes | Lists the Bricks global classes defined on this site as a LEAN index: each entry has id, name, and category id (when assigned). The full settings (Bricks control values) are omitted by default so the response stays small on sites with large class libraries. Read one class's settings on demand with bricks-get-global-class, or pass include_settings: true to inline settings for every class (can be very large). Optionally filter by category id. |
wppilot/bricks-list-interaction-events-and-actionsList Bricks Interaction Events And Actions | Schema discovery: returns the registered trigger (event) keys and action keys Bricks exposes, plus the per-field required dependencies that describe which extra keys are relevant for each trigger/action combination. Call this once before authoring interactions so you pass valid trigger/action values and the right extra keys. |
wppilot/bricks-list-interactionsList Bricks Interactions | Lists every interaction attached to a single Bricks element. Each interaction is returned as stored (flat assoc shape: id, trigger, action, target, targetSelector, templateId, plus action-specific keys). Call wppilot/bricks-list-interaction-events-and-actions first to learn the valid trigger/action keys and their per-action field dependencies. |
wppilot/bricks-list-settingsList Bricks Settings | Lists the Bricks settings schema: page settings (for regular posts/pages), template settings (additional keys available on bricks_template posts), and global settings. By default returns a compact shape (type, label, group, description, value_format, options) sufficient for key discovery and validation. Pass key="…" to drill into a single control with all fields, or verbose=true to dump every field of every control. |
wppilot/bricks-list-template-condition-schemaList Bricks Template Condition Schema | Describes the condition shape accepted by wppilot/bricks-set-template-conditions. No inputs. Pass verbose=true to include a concrete example per main value. Use this before editing conditions — the field names are non-obvious (main=postType, not main=singular; terms use "taxonomy::term_id", not plain slugs). |
wppilot/bricks-list-template-conditionsList Bricks Template Conditions | Returns the conditions attached to a Bricks template. A template with an empty condition list never renders — for header/footer templates, this is the most common reason "the site has no header". Call wppilot/bricks-list-template-condition-schema first to learn the condition shape. |
wppilot/bricks-list-templatesList Bricks Templates | Lists all Bricks templates with their type, status, and template settings (conditions, etc.). Optionally filter by template type. |
wppilot/bricks-list-theme-stylesList Bricks Theme Styles | Lists every Bricks theme style defined on this site. Each entry includes id, label, and conditions (extracted from settings.conditions for quick scanning). Fetch full settings via bricks-get-theme-style. |
wppilot/bricks-list-variablesList Bricks Global Variables | Lists every Bricks global CSS variable defined on this site. Each entry includes id, name (kebab-case, the part after var(--)), value, and category id when assigned. |
wppilot/bricks-resolve-dynamic-dataResolve Bricks Dynamic Data | Renders a single Bricks dynamic-data tag against a specific post and returns the resolved string. Use it to verify a tag works before embedding it into saved content — Bricks leaves unknown tags as their literal {text}, so a successful resolve with a non-empty value is the only real signal the tag is valid. The context argument matches Bricks' own render contexts: text for strings, link for URLs, image for attachment ids/URLs, media for attachment arrays. For bulk rendering use the Bricks builder, not this ability. |
Writes
Gated by the active profile and your WordPress capabilities. Rate limited to 120 per minute per credential.
| Ability | What it does |
|---|---|
wppilot/bricks-add-color-palette-entryAdd Bricks Color Palette Entry | Adds a new color to the Bricks color palette store. Provide a name and a raw color value (hex, rgba, hsl, oklch). Supply palette_id to target a specific palette; if omitted the first palette is used, creating a "Default" palette when none exist. Optionally pass dark (Bricks 2.2+) to give the color a dark-mode variant: the color is then stored in the Color Manager light/dark format and participates in Bricks native dark mode (toggle-mode element, :root[data-brx-theme="dark"] CSS). The color id is auto-generated. Returns {entry: {palette_id, color_id, name, raw, light?, dark?}}. |
wppilot/bricks-add-interactionAdd Bricks Interaction | Adds a new interaction to a Bricks element. Required fields in interaction are trigger (e.g. click, mouseover, enterView, scroll, formSubmit) and action (e.g. show, hide, toggleOffCanvas, startAnimation, scrollTo, setAttribute, javascript). Extra fields depend on the action — call wppilot/bricks-list-interaction-events-and-actions to learn which. The server assigns the id. |
wppilot/bricks-apply-componentApply Bricks Component | Inserts a component instance into a Bricks area. The instance is a tiny element pointing to the component (via cid) — the component body is not duplicated on the page. Position shape matches bricks-insert-content: pass exactly one of after / before / append_to / prepend_to. |
wppilot/bricks-apply-global-classApply Bricks Global Class to Element | Attaches an existing Bricks global class to an element on a page by appending its id to the element's "_cssGlobalClasses" array. Validates the class exists. Idempotent — safe to call if the class is already attached. Area defaults to "content"; use "header" or "footer" for those areas. Note on the CSS cascade: Bricks generates element-level CSS as ID-scoped rules (#brxe-<id> { ... }) and global class CSS as class-scoped rules (.<className> { ... }). ID specificity beats class specificity, so any property already set on the element wins over the same property in a global class — applying the class will look like a no-op for those properties. If the visual effect is missing after applying, clear the conflicting element-level setting (e.g. via bricks-patch-elements) so the class can take effect. |
wppilot/bricks-create-componentCreate Bricks Component | Creates a new Bricks component (a reusable element definition) and returns its generated id. Provide either elements (a fresh element tree) or from_post_id + from_element_id to carve the component out of an existing page subtree. Does not place an instance — call bricks-apply-component afterwards to insert the component onto a page. |
wppilot/bricks-create-global-classCreate Bricks Global Class | Creates a new Bricks global class. Provide a name, a settings object (Bricks control values), and an optional category. Category accepts an existing category id OR a category name (creates the category on-the-fly if it does not exist). The class id is auto-generated (6-char bare id like "clshov"). Rejects if a class with the same name already exists. Settings shape: typed controls first (the shared style controls _padding, _margin, _typography, _background, _border, _display, flex/grid keys, …) discovered via bricks-list-elements include_shared_controls=true; _cssCustom is a last resort for things no typed control covers. Inside _cssCustom the %root% placeholder resolves server-side to the class selector (.<name>), mirroring the element-level convention — e.g. _cssCustom: "%root% { ... }". |
wppilot/bricks-create-templateCreate Bricks Template | Creates a new Bricks template with a given type and optional element data. Returns the new template ID. |
wppilot/bricks-create-theme-styleCreate Bricks Theme Style | Creates a new Bricks theme style. Provide a label (required), an optional settings object (per-element-type defaults), and optional conditions array (same shape as bricks-set-template-conditions). The id is auto-generated with a "ts-" prefix. When conditions is passed, it is embedded under settings.conditions. Conditions arriving nested inside settings (settings.conditions.conditions) are validated and normalized the same way; when both routes are supplied, the dedicated conditions input wins. The response includes an active flag — Bricks only activates a theme style that has at least one condition, so creating one without conditions returns active: false plus a warning. Settings shape: typed controls first, raw CSS (customCss / _cssCustom) only as last resort. Layout primitives (section/container/block) use dimensional keys WITHOUT underscore — width, widthMin, widthMax, padding, margin — even though the equivalent element-level shared controls are _padding/_margin/_width; the flex/layout keys (_display, _direction, _justifyContent, _alignItems, _columnGap, _rowGap) keep the underscore in both contexts. |
wppilot/bricks-create-variableCreate Bricks Global Variable | Creates a new Bricks global CSS variable. Provide a name (auto-converted to lowercase kebab-case, used as var(--name)), a value, and an optional category. Category accepts an existing category id OR a category name (creates the category on-the-fly if it does not exist). Use this from the tokens-first workflow before referencing var(--name) in element settings. |
wppilot/bricks-edit-color-palette-entryEdit Bricks Color Palette Entry | Edits an existing Bricks color palette entry. Provide palette_id, color_id, plus at least one of: name (display name), raw (new color value) or dark (dark-mode variant, Bricks 2.2+). Partial update — omitted fields are left unchanged. Setting dark migrates a legacy color to the Color Manager light/dark format (its current value moves to light, exactly as the Bricks UI does) so the dark variant actually renders; on such colors a later raw edit updates the light value. Pass dark: "" to remove the dark variant. Once at least one color has a dark variant, Bricks offers the toggle-mode element. |
wppilot/bricks-edit-componentEdit Bricks Component | Patches a Bricks component definition in place (label, category, or element tree). Edits to elements are disruptive — every instance of this component on every page re-renders with the new body. Use bricks-list-components first to confirm the scope of affected pages via the instance count, or prefer bricks-create-component for variations. |
wppilot/bricks-edit-global-classEdit Bricks Global Class | Edits an existing Bricks global class by id. Provide at least one of: name or settings. Settings are merged by default (array_replace_recursive); pass replace=true to wipe and replace the full settings object. Settings shape: typed shared style controls (_padding, _margin, _typography, _background, _border, …) first; _cssCustom is a last resort. Inside _cssCustom the %root% placeholder resolves server-side to the class selector (.<name>). Note: renaming a class does not retroactively rewrite already-resolved class selectors inside its stored _cssCustom; re-pass _cssCustom with %root% if you rename and want the CSS to track the new name. |
wppilot/bricks-edit-interactionEdit Bricks Interaction | Merges a patch into an existing interaction on a Bricks element. Only the keys present in patch are modified. Pass a null value for a key to remove that field (useful e.g. to clear targetSelector when switching target back to self). Re-running the same edit is a no-op (idempotent). |
wppilot/bricks-edit-theme-styleEdit Bricks Theme Style | Edits an existing Bricks theme style by id. Provide at least one of: label, settings, or conditions. Settings are merged by default (array_replace_recursive); pass replace=true to wipe and replace the full settings object. When conditions is passed, it replaces settings.conditions directly. Conditions arriving nested inside settings (settings.conditions.conditions) are validated and normalized the same way; when both routes are supplied, the dedicated conditions input wins. Settings shape: typed controls first; raw CSS (customCss / _cssCustom) as last resort. Layout primitives (section/container/block) use dimensional keys WITHOUT underscore — width, widthMin, widthMax, padding, margin — while flex/layout keys (_display, _direction, _justifyContent, _alignItems, _columnGap, _rowGap) keep the underscore. |
wppilot/bricks-edit-variableEdit Bricks Global Variable | Edits an existing Bricks global variable's value. The name and category are immutable after creation (renaming would break every var(--name) reference in pages). To rename, delete and create a new variable. |
wppilot/bricks-insert-contentInsert Bricks Content | Inserts new Bricks elements into an existing area without replacing the full element tree. Use this for structural edits like adding a section before/after an existing element, or prepending/appending children to a container. Position accepts exactly one of: after, before, append_to, prepend_to. If omitted, the new elements are appended at the end of the area as root-level elements. Build with native Bricks elements — the raw "code" element is gated and requires allow_code_elements:true after explicit user confirmation. |
wppilot/bricks-patch-elementsPatch Bricks Elements | Applies targeted updates to specific elements in a Bricks area without replacing the full element tree. Use this for small fixes — correcting a setting on one element, adding flex display to a container, tweaking typography — instead of re-sending the entire tree. |
wppilot/bricks-set-contentSet Bricks Content | Sets the Bricks element tree for a given post or template area. Replaces the entire element array for the specified area. Also sets the editor mode to "bricks" so the post renders via Bricks. Build with native Bricks elements (heading, text-basic, button, image, container, …) — the raw "code" element is gated: a tree containing one is rejected unless you pass allow_code_elements:true after the user explicitly confirms they want raw HTML/code. |
wppilot/bricks-set-post-typesSet Bricks Post Types | Sets the flat list of WordPress post type slugs enabled for Bricks editing. Use this instead of the broad bricks-set-settings ability when fixing Bricks setup. |
wppilot/bricks-set-settingsSet Bricks Settings | Updates Bricks settings. Pass a post_id to set page-level settings, or omit it to set global settings. Settings are merged with existing values by default. |
wppilot/bricks-set-template-conditionsSet Bricks Template Conditions | Replaces the full list of conditions on a Bricks template. Pass the complete desired set — this is a replace operation, not a merge. An empty list clears all conditions (the template will never render). Other template settings (categories, bundles, popup options, etc.) are preserved. |
Destructive
Marked destructive in the source, so each call needs an explicit confirmation flag, every time.
| Ability | What it does |
|---|---|
wppilot/bricks-delete-color-palette-entryDelete Bricks Color Palette Entry | Deletes a Bricks color palette entry by palette_id and color_id. Hard delete — any reference to this color will lose the palette value. A second call for the same color fails with a not_found error. |
wppilot/bricks-delete-componentDelete Bricks Component | Deletes a Bricks component. The orphan_instances parameter controls what happens to existing instances on pages/templates. Default is "error" — the deletion is refused if instances exist, and the caller is returned the list of affected posts so they can choose how to proceed. |
wppilot/bricks-delete-global-classDelete Bricks Global Class | Deletes a Bricks global class by id. Hard delete — any element referencing this class via "_cssGlobalClasses" will lose the applied styles. |
wppilot/bricks-delete-interactionDelete Bricks Interaction | Deletes a single interaction from a Bricks element by its id. Destructive for that interaction only — other interactions on the element and the element itself are untouched. Re-running is safe: a missing id returns success=false with a not_found error message. |
wppilot/bricks-delete-theme-styleDelete Bricks Theme Style | Deletes a Bricks theme style by id. Hard delete — any pages that relied on this theme style will revert to Bricks defaults. |
wppilot/bricks-delete-variableDelete Bricks Global Variable | Deletes a Bricks global variable by id. Hard delete: any var(--name) reference in pages will fall back to the CSS default until re-created or replaced. |
wppilot/bricks-remove-contentRemove Bricks Content | Removes existing Bricks elements from an area without replacing the full element tree. By default each target ID removes the full subtree rooted at that element, including all descendants. |