Get the plugin
WP MCP/Guides/Guide

By · Published · Updated

Edit Bricks and Divi pages with your AI agent, with rollback

Bricks stores a page as a JSON tree of elements in post meta. Divi stores it as nested shortcodes in the post content. Neither looks anything like the page you see, which is why a generic “edit my WordPress page” tool breaks both. WP MCP Pro reads the real structure of each, lets your AI client change it, and snapshots the post before every write so a bad edit is one call from undone.

Free or Pro? Pro. The three builder tools (detect-builder, get-builder-content and update-builder-content) are Pro abilities. The undo tools (list-operations, rollback-operation) and search-content are free and work alongside them.

What you need

  • WP MCP Pro installed and connected to your AI client. The connection docs cover it.
  • A page built with Bricks or Divi. Grab its post ID from the edit screen URL.

Step 1: confirm which builder owns the page

› What builder is page 882 built with?

The agent calls detect-builder with post_id: 882. The answer is one of elementor, bricks, divi, wpbakery, avada, beaver-builder, breakdance, oxygen, oxygen-classic, thrive, gutenberg or classic. Do this first on any site that has had more than one builder over its life, because a page that was migrated from Divi to Bricks can still carry old Divi shortcodes in its content, and you want the agent writing to the structure that actually renders.

Step 2: read the structure

› Show me the structure of page 882.

get-builder-content returns what the builder stores:

  • Bricks: the element tree, each element with its id, name, parent and settings. Headings, text and buttons are plain to read.
  • Divi: the shortcode tree, each module with a path so you can point at it precisely.

If you only need to find one string on a page, search-content (free) searches Bricks settings as well as ordinary post content and returns the element id of the hit. That is often faster than reading the whole tree.

Bricks users can also ask about site-wide design tokens:

› List the global classes and color palette in Bricks.

get-builder-content with scope: "design_system" returns classes, variables and palettes, and scope: "catalog" lists the available element types and their controls, so the agent knows what settings an element accepts before it proposes a change.

Step 3: make the change

› Change the hero heading on page 882 from "Welcome" to "Spring collection is
  here" and make the button link to /shop.

For Bricks and Divi the write is a full-structure replacement: update-builder-content takes post_id, builder and content. The agent takes the tree it read in Step 2, changes only the heading text and the button URL, and writes the whole structure back. For Bricks the content must be well-formed JSON that decodes to an array, and it is written to the builder’s own page content meta. For Divi the content is the shortcode string, written to the post content, with the Divi builder flag kept on so the page still opens in the Divi editor.

Before the write lands, WP MCP captures a snapshot of the post, meta included. That is what makes Step 5 work.

Two things to tell the agent explicitly the first few times:

  • Change only the elements I named, and leave every other element’s settings exactly as read.
  • Tell me which element ids you changed before you write.

The second is a habit worth keeping: the structure dump is where you catch an agent that is about to “tidy up” fifteen elements you did not mention.

Step 4: verify

Open the page on the front end. Bricks and Divi both have their own caches, and a caching plugin may hold the old HTML, so if you still see “Welcome”, ask the agent to run clear-cache and reload. Then open the page in the builder’s editor and check that it loads and that the elements you did not touch look the same.

Ask the agent to read the structure again:

› Read page 882 again and diff it against what you read before the change.

get-builder-content runs a second time and the agent compares. The only differences should be the heading text and the button URL.

Step 5: roll back

If the editor shows a broken element, or the agent changed more than you asked:

› Undo the last change to page 882.

The agent finds the write in list-operations and calls rollback-operation with its operation_id. The snapshot is restored: the Bricks element meta or the Divi post content goes back to exactly what it was. This works because a builder page is an ordinary post plus meta, and that is what WP MCP snapshots.

What the builder tools do not do

They do not generate a new Bricks or Divi page from nothing. They read and rewrite structure that already exists, which is the right shape for the everyday job: copy changes, link fixes, swapping an image, retiring a section. Divi 5 pages can also be edited one element at a time by path, and Bricks global classes, variables and palette colors can be changed too. For a full page build from one prompt, Elementor is the builder with the deepest toolset today; see the Elementor page. If you are weighing the builder’s own assistant against an agent, read Divi AI vs MCP.

Next step

The builder tools are part of WP MCP Pro, alongside Elementor deep editing, WP-CLI and the PHP snippet tools. See the pricing page for the full Pro list and the current launch offer.

Common questions

Can AI edit a Bricks or Divi page?

Yes, with WP MCP Pro. It reads the page's real structure (the Bricks element tree or the Divi shortcode tree), lets your AI client change it with update-builder-content, and snapshots the post before the write.

Which WP MCP tools edit page builder content?

detect-builder identifies the builder, get-builder-content reads the structure and update-builder-content writes it back. These three are Pro abilities, while search-content, list-operations and rollback-operation are free.

How do I undo a bad Bricks or Divi edit?

Ask the agent to find the write in list-operations and call rollback-operation with its operation_id. The snapshot restores the Bricks element meta or the Divi post content to exactly what it was before the edit.

Can WP MCP Pro build a whole Bricks or Divi page from one prompt?

No. The builder tools read and rewrite structure that already exists, which suits copy changes, link fixes and swapping images. Elementor is the builder with deep element-level tools today.

How does the agent know which builder a page uses?

It calls detect-builder with the post ID and gets back one of elementor, bricks, divi, wpbakery, avada, beaver-builder, breakdance, oxygen, oxygen-classic, thrive, gutenberg or classic. Run it first on sites that have changed builders over time.

All WP MCP guides, or see every plugin integration. Topic: Other page builders.