Get the plugin
WP MCP/Integrations/Page builders

Page builders integration

Cornerstone AI agent tool reference

Cornerstone stores a page as a JSON element list in its _cornerstone_data post meta: top-level elements with their non-default values as flat keys and their children under _modules. Element ids are handed out on every save and are not stored, so WP MCP addresses elements by dotted child indexes ("0" is the first top-level element, "0.1" its second child). It reads the list as a tree with a path per element, and writes either the whole element list or one element operation (update, add, remove or move by path), plus publish, restore to a revision and add from a saved section or page template. Writes go through Cornerstone itself so it rebuilds what the page renders from, which means Cornerstone has to be loaded, and once a page holds a layout a write needs the expected_hash the read returned. Every write is snapshotted and reversible.

detect-builderget-builder-contentupdate-builder-content

In practice

How Cornerstone work goes with an agent.

Cornerstone, Themeco's builder inside X and Pro, saves a page in two places. The layout is a JSON element list in _cornerstone_data, and post_content holds the page as Cornerstone rendered it, between cs-content comments. A _cornerstone_override flag marks a page whose owner went back to the WordPress editor, which Cornerstone then stops rendering, and WP MCP's detection follows the same rule. Because only Cornerstone can render post_content, every write is handed to Cornerstone's own save, after WP MCP has checked element placement against Cornerstone's valid_children and valid_parent definitions.

Change the hero headline to Book a free survey.

Runs get-builder-content for the tree and hash, then update-builder-content with operation update, the element's path and attrs such as text_content. The generic text argument is refused for Cornerstone with a message pointing at attrs. Cornerstone saves and re-renders the page after the snapshot.

Add a pricing table at the end of the services page.

Runs get-builder-content with scope catalog to confirm the element type and its values, then update-builder-content with operation add. Placement is checked first: an unknown type or a parent that does not accept it is refused with a message naming what the parent takes, and nothing is written.

Put the About page back the way it was yesterday.

Runs get-builder-content, whose read lists up to 20 revisions newest first with id, date, author and hash, then update-builder-content with operation restore and path set to the revision id. The restore is a normal snapshotted write, so it can be undone too.

Add our saved Testimonials section to the homepage.

Runs get-builder-content with scope templates, which lists cs_template posts, then update-builder-content with operation add and element {template: id}. Section and page templates can be added; presets and layout templates cannot. The write is hash-guarded and saved through Cornerstone.

What your AI can do

Real Cornerstone operations, every write reversible.

  • Detect Cornerstone pages
  • Read a page's element list as a tree with a path per element
  • Update, add, remove or move one element by path, or replace the whole list
  • Publish, restore a revision, or add from a saved section or page template
  • Pin a write to the read's hash so a page changed meanwhile is refused
  • Roll back any layout write exactly

Example prompts

Example Cornerstone prompts.

Which pages are built with Cornerstone?

Change the headline in the first section of the Cornerstone homepage.

Move the testimonials element above the pricing element on /services.

Under the hood

The Cornerstone calls, under the hood.

wpmcp, cornerstone

get-builder-content({ post_id: 24 }), element list as a tree, with a hash

update-builder-content({ post_id: 24, builder: "cornerstone", operation: "update", path: "0.1", attrs: {…}, expected_hash }), saved through Cornerstone, snapshotted

Safety and access

What can be undone on Cornerstone, and what costs what.

Recoverable on Cornerstone

  • Layout meta, settings meta and the rendered post_content are all captured by the post snapshot, so a rollback restores the layout and the page it rendered together.
  • Publish and restore operations run inside the same snapshot, so each of them is undoable like any edit.

Cornerstone limits and opt-ins

  • Every write needs Cornerstone loaded, standalone or bundled in X or Pro, and is refused with plugin_missing otherwise. Cornerstone's own per-post permission check also applies.
  • A page that already has a layout needs expected_hash from the latest read.
  • Global colors and fonts are read-only, and presets and layout templates cannot be inserted into a page.
  • The read returns the page's custom CSS and JS, but no operation edits them.
  • Publish works only on a draft, pending, private or scheduled page, and only for a user who may publish it.

Free or Pro: Cornerstone detection, reads, element writes, publish, restore and the template, design and catalog scopes are all Pro, and none needs an opt-in filter. Reads work from the stored rows, so on a staging copy where Cornerstone is not loaded you can still read a page, but every write is refused until it is.

Part of WP MCP Pro

The Cornerstone integration is part of WP MCP Pro.

One Pro licence unlocks the Cornerstone tools and every other Pro integration on this site: Elementor deep editing, the other page builders, the forms adapter pack and more, 133 Pro tools in all. The free plugin still covers the rest of WordPress and the full snapshot and undo engine, so you can try the safety model before you buy.

Frequently asked

Cornerstone MCP: questions, answered.

Why does Cornerstone have to be active to edit?

A Cornerstone write is saved through Cornerstone's own engine so it regenerates the rendered output and keeps the page consistent. Reads work on the stored JSON directly.

How are elements addressed without stored ids?

Cornerstone hands out element ids on every save and does not store them, so WP MCP uses dotted child indexes instead: "0" is the first top-level element and "0.1" its second child.

With Cornerstone, can the agent edit text with the text argument?

No. Cornerstone elements keep their text in values, so the agent passes attrs, for example text_content on a headline or text element. The catalog scope with an element name lists the value keys and their defaults.

How does it stop an element going somewhere Cornerstone would not allow?

Before saving, it checks each placement against the element definitions Cornerstone itself loads: the parent's valid_children and the child's valid_parent, with the page body as the top level. A bad placement is refused with an explanation.

Can the Cornerstone integration see the site's global colors and fonts?

Yes, read-only. get-builder-content with scope design_system returns the global colors and fonts Cornerstone stores in its options, so an agent can match a new element to the site's palette. Writing them is not offered.

Which Cornerstone version is this built against?

The adapter was written against the Cornerstone 7.8.12 source, and every read reports the loaded plugin version and whether Cornerstone is active, so you can see when a site runs something newer.

Point your AI at Cornerstone.