# Royal MCP’s Divi Tools — Reference

> Royal MCP's nine free Divi tools edit Divi 4 shortcodes and Divi 5 blocks safely from Claude, ChatGPT or Perplexity, plus the Divi Claude Skill and Pro tools.

- Canonical: <https://royalplugins.com/support/royal-mcp/divi-tools/>
- Last updated: 2026-09-22
- HTML version: <https://royalplugins.com/support/royal-mcp/divi-tools/>

---

Nine free tools that let Claude, ChatGPT, or Perplexity edit Divi pages safely — on both Divi 4 (shortcode format) and Divi 5 (block format). Format detection, layout validation, format-aware find-and-replace, page cloning with fresh clientIds, and Library-entry application. Every destructive write emits a 72-hour undo token.

## How Divi + Royal MCP works

When [Divi](https://www.elegantthemes.com/gallery/divi/) is active on your site — either the Divi Builder plugin or the Divi theme — Royal MCP registers nine additional MCP tools for AI-driven Divi editing. Tools appear automatically the moment Divi is detected; no configuration required.

Divi’s data model is unlike Elementor’s. Divi 4 stores pages as nested shortcodes with their own quote-parsing quirks. Divi 5 stores them as blocks with clientId references that must stay unique. Both formats have footguns that break naive find-and-replace — a missing close-tag, a dropped dynamic-content token, a collision on cloned clientIds. Every Divi write tool in Royal MCP validates layout structure before saving. If the write would break the layout, the tool refuses it and returns the specific error, so an AI agent can retry or bail cleanly.

Undo tokens on destructive writes

Every clone, replace, and import operation returns an undo token valid for 72 hours. Ask your AI client to undo the last operation and it’ll roll the write back cleanly without touching anything else on the page.

## The nine free Divi tools

### divi\_get\_page\_format

Detect whether a page uses Divi 4 shortcode format or Divi 5 block format.

AI agents route to the right editing pattern automatically. Use this as the first step of any multi-step Divi workflow so downstream tool calls know which format they’re working with.

### divi\_get\_page\_outline

Extract the section, row, column, and module structure of any Divi page.

The read-only companion to every Divi editing workflow. Ask Claude for the outline before planning a rebuild or audit — the response is compact enough to fit in a normal chat context, and includes module IDs so subsequent write operations can target specific elements.

### divi\_validate\_layout

Pre-write validator: checks matched open/close pairs, whitelisted module names, preserved dynamic-content tokens.

Refuses writes that would corrupt the layout. Every other Divi write tool calls this internally, but it’s also exposed directly so an AI agent can validate a hand-crafted layout string (from clipboard, from a snippet library, from a paste job) before pushing it.

### divi\_list\_local\_templates

Enumerate saved layouts in the Divi Library.

Returns ID, name, type, and creation date for every entry. Use this to let an AI agent pick a template by name (“apply the City Services layout to the Portland page”) instead of forcing the user to look up IDs.

### divi\_library\_get

Read a specific saved layout from the Divi Library by ID.

For inspection or reuse. Pair with `divi_import_template` to copy a Library entry’s structure into a target page.

### divi\_replace\_text

Format-aware find-and-replace across all modules on a Divi page.

Dry-run preview and active-editor-session detection built in. Safe for both Divi 4 and Divi 5 pages. If someone has the page open in the builder at the moment of the write, the tool refuses so it doesn’t stomp on unsaved edits.

### divi\_clone\_page

Duplicate any Divi 4 or Divi 5 page as a fresh draft.

Preserves builder meta and regenerates Divi 5 clientIds so the duplicate opens in the editor without ID collisions. 72-hour undo token included. Common pattern: clone a services page, then use `divi_replace_text` and `divi_replace_image` to retarget it for a new offering.

### divi\_replace\_image

Swap an image URL across every image-bearing Divi element on a page.

Dual-format aware for Divi 4 shortcodes and Divi 5 blocks. Handles background images, module images, gallery items — anywhere Divi stores an image reference. 72-hour undo token included.

### divi\_import\_template

Apply a saved Divi Library entry to a target page.

Merge mode appends to existing content; replace mode overwrites. Useful for standing up a new page from a saved template, or adding a shared section (footer CTA, testimonials block) to an existing page. 72-hour undo token included.

## Example queries

Ask Claude, ChatGPT, or Perplexity questions like these once Divi + Royal MCP are connected:

- “Is my /pricing page built in Divi 4 or Divi 5, and what modules does it use?”
- “Show me the section-and-module outline of the homepage so I can plan a rebuild.”
- “Replace every ‘Buy Now’ label with ‘Get Started’ on the homepage — but preview first.”
- “Clone my New York services page as a Denver services draft.”
- “Swap the hero image on the About page from the old headshot URL to the new one.”
- “Apply my ‘City Services’ Divi Library entry to the Portland page in merge mode.”
- “List every saved layout in the Divi Library so I can pick one to reuse.”
- “Validate the layout string in my clipboard before I paste it into the About page.”

## The Divi Claude Skill — teach Claude your patterns

The Divi tools are the API surface. The **Divi Claude Skill** is the playbook that teaches Claude how to use them well: when to clone versus author from scratch, how to plan D4→D5 migration, which patterns hold up across builder versions.

[Free Skill

Divi Claude Skill

Drop-in Claude Skill: knows Divi shortcodes, block schema, migration workflow, and the safest editing patterns for both D4 and D5.](https://royalplugins.com/skills/divi-claude-skill/)

## Pro Divi toolkit — agency-scale editing

The free nine tools cover single-page work — clone, edit, swap, apply. Bulk work across many pages, cross-site client work, and D4→D5 migration land in **Royal MCP Pro**. The Pro toolkit adds eight more Divi tools plus programmatic-authoring support:

[Pro Reference

Divi Pro Tools

Complete reference for the 8 Divi Pro tools: library CRUD, global-preset application, shortcode-to-block conversion, batch mode with single-batch undo tokens.](https://royalplugins.com/support/royal-mcp-pro/divi-tools/)
[Deep Dive

Divi 5 Authoring — Programmatic Block Schema

Author Divi 5 modules programmatically. Complete block schema, the five requirements Divi silently enforces, the double-quote encoding rules, and the failure modes that catch new implementers.](https://royalplugins.com/support/royal-mcp-pro/divi-5-authoring/)
[Migration

Divi 4 → 5 Migration Guide

End-to-end walkthrough for migrating a Divi 4 site (or a portfolio of them) to Divi 5 using Royal MCP Pro’s `divi_convert_shortcodes_to_blocks` tool.](https://royalplugins.com/support/royal-mcp-pro/divi-migrator-guide/)
[Workflow

Divi Page Cloning Workflow

Retarget a services page for a new offering, duplicate landing pages for A/B tests, rebrand a template for a client — the full cloning-and-editing pattern end-to-end.](https://royalplugins.com/support/royal-mcp-pro/divi-page-cloning-workflow/)

## Divi 5 — recovery for the empty-post case

Divi 5’s block format has one recovery scenario worth calling out separately, because it’s the failure mode that surprises new users of programmatic authoring. If a Divi 5 post is authored programmatically and then someone opens it in the WordPress editor or Divi builder afterward, the post body can end up empty. The recovery is straightforward but has to happen in the right order.

[Recovery Guide

Divi 5 Post Emptied by the Builder

What causes it, how to recover the post content, and the workflow rules that prevent it from happening in the first place.](https://royalplugins.com/support/royal-mcp-pro/divi-5-post-emptied-by-builder/)

## Permissions & safety

Divi write operations require the connecting user to have `edit_posts` or `edit_pages` capability on the relevant content. Royal MCP enforces WordPress’s standard capability checks on every Divi tool call — the AI client can only edit what the user themselves has permission to edit.

Active-editor detection

If a Divi page is open in the builder when a write is attempted, tools that mutate content will refuse rather than risk stomping on unsaved edits. Close the builder tab (or dismiss the session) before re-running the write.

Undo is 72 hours

Undo tokens for clones, replaces, and imports are valid for 72 hours from the operation. After that they expire — use the WordPress revision system for older rollbacks.

[Back to Royal MCP Support](https://royalplugins.com/support/royal-mcp/)
[Elementor Tools Reference](https://royalplugins.com/support/royal-mcp/elementor-tools/)
