Browse documentation +
Getting startedInstallationConnect a clientSafety profilesWordPress ChatPro licensingAntigravity CLIAntigravity IDETroubleshootingOAuth 2.1 setupApplication PasswordsPage builder workflowsLedger and rollbackApprovals and memoryAbility reference
Pro module47 abilities

Divi 5

These abilities register when Divi 5 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

Divi 5 registers 47 abilities: 17 that only read, 23 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

Work with Divi modules and structured content alongside Theme Builder templates, dynamic sources, loops, global presets, colors, fonts, and display conditions.

Before you rely on it: Global presets and Theme Builder assignments can affect many pages; review their dependency radius first.

Typical workflows

  • Compose a module section from the available schema
  • Update a global preset after finding every dependent surface
  • Review Theme Builder conditions before changing a global template

The Divi 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 Divi 5 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.

AbilityWhat it does
wppilot/divi-check-setupCheck Divi SetupReports the Divi 5 environment status: builder version, whether the D5 (block-based) builder is enabled, the module API availability, the number of registered modules, the post types the builder is enabled for, and the active responsive breakpoint names (the valid <breakpoint> keys for the responsive attr shape, e.g. desktop, tablet, phone). Run this before building or editing Divi pages to confirm the environment is ready.
wppilot/divi-get-contentGet Divi ContentParses a post's Divi 5 module tree (the divi/* WordPress blocks in post_content) into a flat, addressable list of nodes. Each node carries its address (a slash path like "0/1/0" that locates it in the tree), module name, parent address, child addresses, and a compact summary (loop enabled, count of dynamic-content bindings, interaction count, raw_html flag). Pass include_attrs=true to also return each node's full attributes (byte-capped per field). Accepts the post id as "post" or "post_id". Node count is capped (default 400) with a truncation marker.
wppilot/divi-get-global-fontsGet Divi Global FontsReturns Divi's site-wide global font settings: the heading and body font families (heading_font, body_font), their weights (heading_font_weight, body_font_weight), and the base body font size / line-height (body_font_size, body_font_height) plus the tablet/phone base sizes. An empty value means the Divi default is in effect. Change them with wppilot/divi-set-global-fonts.
wppilot/divi-get-global-presetGet Divi Global PresetReturns one global module preset in full: its module, id, name, and the styling attributes it applies. Identify it by "module" and "preset_id" (from wppilot/divi-list-global-presets).
wppilot/divi-get-module-schemaGet Divi Module SchemaReturns the settable content/configuration fields for one Divi 5 module as a list of field objects, each carrying its canonical attrName path (e.g. "content.innerContent"). Each field reports its label, description, category, editor component, value sub-fields, and whether it accepts dynamic content. Also lists the universal style groups available under module.decoration.* (background, spacing, border, fonts, …) and the module's allowed children. Accepts the module name with or without the "divi/" prefix. This is the per-module companion to wppilot/divi-list-modules.
wppilot/divi-get-style-schemaGet Divi Style SchemaReturns the universal styling and advanced attributes available on a Divi 5 module — the "decoration" styles (background, spacing, border, sizing, fonts, animation, position, …) plus "advanced" module options that are otherwise hard to find: the CSS ID and class (group "htmlAttributes"), link, column gutter, and text-shadow. Each row is tagged segment: "decoration" or "advanced". These are the groups wppilot/divi-get-module-schema only names as style_groups. By default returns a compact summary (group, segment, attrName, field_count); pass "group" (e.g. "background" or "htmlAttributes") to get that group's individual fields. Set a value with wppilot/divi-edit-module at <attrName>.<breakpoint>.value.<field> — e.g. module.decoration.spacing.desktop.value.padding.top, or module.advanced.htmlAttributes.desktop.value.id for a CSS ID. Accepts the module name with or without the "divi/" prefix.
wppilot/divi-list-condition-typesList Divi Display Condition TypesLists the display-condition types a module can be shown/hidden by, as rows: conditionName, label, display_rules (the values for "displayRule"), and settings (the extra keys that condition reads). Pass these to wppilot/divi-set-display-conditions. Examples: loggedInStatus (displayRule loggedIn/loggedOut), categories (displayRule is/isNot + categories), dateTime, numberOfViews, cookie. WooCommerce types (productPurchase, cartContents, productStock) require WooCommerce.
wppilot/divi-list-dynamic-sourcesList Divi Dynamic SourcesLists the dynamic-content sources Divi 5 can bind module fields to (post_title, post_excerpt, post_featured_image, post_meta_key, site_title, product_*, ACF fields, …). The set is contextual: pass "post" to scope it to that post's type (e.g. to surface its ACF fields or WooCommerce product sources). By default returns compact rows (id, label, group); pass a single "source" id to get that source's full detail including its settings fields (e.g. before/after, meta_key). The "id" is the value you pass as "source" to wppilot/divi-apply-dynamic-content. Filter by "group" or "search".
wppilot/divi-list-global-colorsList Divi Global ColorsLists this site's Divi global colors (the brand palette) as rows: id (a "gcid-…"), color, status, named (true for the five built-in theme colors — primary, secondary, heading, body, link), and var (the CSS value to bind with, e.g. "var(--gcid-…)"). Bind a module color field to a global color by setting it to that var() value with wppilot/divi-edit-module. Only the five named colors means no custom colors exist yet.
wppilot/divi-list-global-presetsList Divi Global PresetsLists the global module presets defined on this site (authored in the Divi Visual Builder), as compact rows: module, id, name, is_default. The "id" is what you pass to wppilot/divi-apply-global-preset. Filter by "module" (with or without the "divi/" prefix). An empty list means no presets have been created yet.
wppilot/divi-list-interaction-typesList Divi Interaction TypesLists the interaction triggers and effects a module can use, so you can build motion (a trigger on the module runs an effect on it). Returns "triggers" (e.g. onClick, onHover, onScroll, onLoad, onMouseMove, onView, onSubmit, breakpointEnter/Exit) and "effects" (toggleVisibility, scrollToElement, mirrorMouseMovement), each with a label and its extra "settings" keys. Pass these to wppilot/divi-set-interactions. Interactions are not responsive (desktop only). v1 targets the module itself (self-target).
wppilot/divi-list-library-itemsList Divi Library ItemsLists the saved Divi Library items (reusable layouts/sections/rows/modules), as rows: id, title, type ("section", "row", "module", or "layout"), and global (true = a live-linked Global item; editing it updates every page using it). Insert one into a page with wppilot/divi-apply-library-item. A library item id is an ordinary Divi post — edit its content with the normal content/module abilities by passing the id as the post.
wppilot/divi-list-loop-query-typesList Divi Loop Query TypesLists the query types a Divi 5 query loop supports, what each one's "sub_types" mean, and the ordering options. Use this before wppilot/divi-enable-loop to pick a valid query_type and order_by. order_by is passed straight to WP_Query, so any WP_Query orderby works — the list shows the common ones.
wppilot/divi-list-modulesList Divi ModulesLists the available Divi 5 module types from the module registry. Returns compact rows: name, title, category ("structure" | "module" | "child-module" | "fullwidth-module"), plus loop_capable (true when the module accepts a query loop via wppilot/divi-enable-loop — note divi/blog runs its own query and is not flagged), raw_html (only on the code modules) and children (only on containers that host named child modules). Use wppilot/divi-get-module-schema for a single module's settable fields. Structural modules nest as divi/section > divi/row > divi/column > leaf modules. Modules flagged raw_html (divi/code, divi/fullwidth-code) hold raw HTML and should be avoided in favor of building native modules. Filter by category or a name/title search to keep the response small.
wppilot/divi-list-theme-builder-conditionsList Divi Theme Builder ConditionsLists the assignment conditions a Theme Builder template can be assigned to (use_on / exclude_from) — each row is an id (e.g. "singular:post_type:page:all", "homepage", "archive:post_type:post") and a human label. A "dynamic" id ending in ":" needs a specific object id appended (e.g. "singular:post_type:page:id:" + a page id). Use these ids with wppilot/divi-create-theme-builder-template and wppilot/divi-set-theme-builder-conditions.
wppilot/divi-list-theme-builder-templatesList Divi Theme Builder TemplatesLists the Divi 5 Theme Builder templates: each template's id, title, whether it is the default/enabled, its header/body/footer layout post ids (with enabled flags), and its assignment conditions (use_on / exclude_from). The header/body/footer layout ids are ordinary Divi posts — edit their module trees with the standard wppilot/divi-get-content, divi-set-content, and divi-*-module abilities by passing the layout id as the post. An empty list means no Theme Builder templates are defined.
wppilot/divi-list-variablesList Divi VariablesLists this site's Divi global variables (design tokens) as rows: id (a "gvid-…"), type (numbers, strings, images, links, fonts), label, value, var (the CSS value to reference, e.g. "var(--gvid-…)"), and builtin (true for the theme's font variables, which are read-only here). Reference a token anywhere a CSS value is accepted by setting that field to the row's var() value with wppilot/divi-edit-module.

Writes

Gated by the active profile and your WordPress capabilities. Rate limited to 120 per minute per credential.

AbilityWhat it does
wppilot/divi-add-moduleAdd Divi ModuleInserts a module into a post's Divi 5 tree under a parent (by address) at an optional position. Omit "parent" to insert a divi/section at the top level. The module name (divi/* — prefix optional), optional attrs, and optional nested children are validated against the structural skeleton (section > row > column > leaf modules); the insertion is rejected if the module cannot nest under the parent. Raw-HTML code modules (divi/code, divi/fullwidth-code) anywhere in the payload are rejected unless you pass the explicit opt-in "allow_code_modules": true — style pages via module.decoration.* attrs, global presets, and global colors/variables instead (see divi-get-style-schema). Returns the new module's address. Content HTML carrying inline style="…" attributes is rejected unless you pass the explicit opt-in "allow_inline_styles": true — style via the module's native attrs instead. Accepts the post id as "post" or "post_id".
wppilot/divi-apply-dynamic-contentApply Divi Dynamic ContentBinds a module field to a dynamic-content source so it resolves at render time (e.g. a heading to the post title, an image to the featured image). Identify the module by "address" (from wppilot/divi-get-content) and the field by its attrName "field" (from wppilot/divi-get-module-schema — fields with dynamic:true; e.g. "content.innerContent", "title.innerContent"). "source" is a dynamic source id from wppilot/divi-list-dynamic-sources (e.g. "post_title", "post_meta_key"). Optional "settings" carries source options (e.g. {"before":"$","after":""} or {"meta_key":"price"}). The value is written as Divi's {"type":"content","value":{"name":source,"settings":…}} at <field>.<breakpoint>.value. Accepts the post id as "post" or "post_id".
wppilot/divi-apply-global-presetApply Divi Global PresetAttaches an existing global preset to the module at "address" (sets attrs.modulePreset). The preset must belong to that module's type — a divi/text preset only applies to a divi/text module. Use wppilot/divi-list-global-presets to find a preset_id. Accepts the post id as "post" or "post_id".
wppilot/divi-apply-library-itemApply Divi Library ItemInserts a saved Divi Library item (by "library_id") into the page at "post", under the "parent" address (omit "parent" for the top level — a saved section), at an optional "position". A regular item is inserted as a copy (nesting validated: a section at the top level, a row under a column, …); a Global item is inserted once as a live-linked reference, so editing the library item later updates this page too. Returns the new module address(es). Accepts the target post id as "post" or "post_id".
wppilot/divi-clear-dynamic-contentClear Divi Dynamic ContentRemoves a dynamic-content binding from a module field at "address"/"field" (the same ones used with wppilot/divi-apply-dynamic-content). If you omit "value", only the dynamic $variable(...) token is stripped — surrounding literal text is preserved (a whole-field binding clears to empty); pass "value" to set an explicit static replacement instead. Operates on one breakpoint (default "desktop"). Accepts the post id as "post" or "post_id".
wppilot/divi-create-global-colorCreate Divi Global ColorAdds a new custom color to the brand palette and returns its id (a "gcid-…") and the "var(--gcid-…)" you bind with. Pass "color" as any CSS color (hex, rgb(a), hsl, …). Bind a module to it by setting a color field to the returned var() value via wppilot/divi-edit-module — then a palette change restyles every bound element at once.
wppilot/divi-create-global-presetCreate Divi Global PresetCreates a new reusable global preset (a named styling bundle) for one module type and returns its "preset_id". "attrs" uses the same shape as wppilot/divi-edit-module — the module's attributes object, e.g. {"module":{"decoration":{"spacing":{"desktop":{"value":{"padding":{"top":"40px"}}}}}}}. Attach it to modules with wppilot/divi-apply-global-preset, or make it the type's default for new modules with wppilot/divi-set-default-preset. Discover attr paths with wppilot/divi-get-style-schema.
wppilot/divi-create-library-itemCreate Divi Library ItemSaves a reusable layout to the Divi Library and returns its library_id. Pass "post" (the source page) and an optional "address" to save just that subtree (e.g. "0" for the first section); omit "address" to save the whole page. Give it a "title". Set "global": true to save it as a Global item — instances stay linked to it, so a later edit of the saved item updates every page using it (default is a plain copy on insert). Reuse it with wppilot/divi-apply-library-item. Accepts the source post id as "post" or "post_id".
wppilot/divi-create-theme-builder-templateCreate Divi Theme Builder TemplateCreates a Theme Builder template with empty header/body/footer layouts and assigns where it applies, then returns the template_id and the new layout post ids. "areas" picks which layouts to create (any of "header", "body", "footer"). "use_on"/"exclude_from" are condition ids from wppilot/divi-list-theme-builder-conditions. Build each returned layout id with the normal wppilot/divi-set-content and divi-*-module abilities (pass the layout id as the post). Set "default": true for the site-wide fallback template. It applies immediately on the front end.
wppilot/divi-create-variableCreate Divi VariableCreates a new design token of a given "type" (numbers, strings, images, or links) with a "label" and "value", and returns its id (a "gvid-…") and "var(--gvid-…)". Use numbers for sizes/spacing/radii (e.g. "16px", "1.5rem", "clamp(1rem,2vw,3rem)"), strings for arbitrary text, images for an image URL, links for a URL. Reference it by setting a module value to the returned var() value via wppilot/divi-edit-module. For brand colors use wppilot/divi-create-global-color instead.
wppilot/divi-disable-loopDisable Divi LoopTurns off the query loop on the module at "address" (sets module.advanced.loop.enable to "off"), leaving the rest of the query configuration in place so it can be re-enabled. Accepts the post id as "post" or "post_id".
wppilot/divi-edit-global-colorEdit Divi Global ColorChanges a global color's value and/or status by id (a "gcid-…" from wppilot/divi-list-global-colors). Works for custom palette colors and for the five built-in theme colors (primary/secondary/heading/body/link) — editing a named color updates it site-wide. Every element bound to the color updates at once.
wppilot/divi-edit-global-presetEdit Divi Global PresetEdits an existing global preset in place. Identify it by "module" and "preset_id" (from wppilot/divi-list-global-presets). Pass "name" to rename and/or "attrs" to change its styling — "attrs" is deep-merged into the preset's existing attributes (nested objects merge; lists and scalars replace), same shape and semantics as wppilot/divi-edit-module. Editing a preset restyles every module it is applied to at once.
wppilot/divi-edit-loopEdit Divi LoopUpdates the query parameters of an existing loop on the module at "address" without re-enabling it or changing its loop id. Pass any of query_type, sub_types, order_by, order, per_page, offset — only the provided ones change. Use wppilot/divi-enable-loop to first turn a loop on. Accepts the post id as "post" or "post_id".
wppilot/divi-edit-moduleEdit Divi ModuleUpdates a single module's attributes in place by address (e.g. "0/0/0"). The provided "attrs" are deep-merged into the module's existing attributes: nested objects are merged, while lists and scalars replace. Use wppilot/divi-get-module-schema to find a module's attr paths (most values use the responsive shape <attrName>.<breakpoint>.value). Pass the nested object form ({"module":{"decoration":{"spacing":{"tablet":{"value": …}}}}}); a flat dotted key like "module.decoration.spacing.tablet.value" is also accepted and auto-nested (Divi 5 does not render flat keys), with a warning. The module type is not changed. Content HTML carrying inline style="…" attributes is rejected unless you pass the explicit opt-in "allow_inline_styles": true — style via the module's native attrs instead. Accepts the post id as "post" or "post_id".
wppilot/divi-edit-variableEdit Divi VariableChanges a design token's "label", "value", and/or "order" by id (a "gvid-…" from wppilot/divi-list-variables). The token's type is fixed (delete and recreate to change it). Everything referencing the token updates at once. Built-in font variables are not editable here.
wppilot/divi-enable-loopEnable Divi LoopEnables a query loop on a loop-capable module so it repeats once per query result. Identify the module by "address" (from wppilot/divi-get-content). Configure the query with query_type (see wppilot/divi-list-loop-query-types), sub_types (e.g. post-type slugs ["post"]), order_by, order, per_page, offset. Only modules flagged loop_capable by wppilot/divi-list-modules accept a loop (note: divi/blog runs its own query and is not loop-capable). Writes module.advanced.loop. Accepts the post id as "post" or "post_id".
wppilot/divi-move-moduleMove Divi ModuleMoves a module (and its subtree) to a new parent and/or position within a post's Divi 5 tree. "address" is the module to move; omit "new_parent" (or pass "") to move it to the top level; "position" is the index among the destination's children (defaults to the end). The destination nesting is validated against the structural skeleton, and a module cannot be moved into itself or its own descendant. Returns the module's new address. Accepts the post id as "post" or "post_id".
wppilot/divi-set-default-presetSet Divi Default PresetSets which preset is the default for a module type — the preset automatically applied to every newly inserted module of that type. Identify it by "module" and "preset_id" (from wppilot/divi-list-global-presets). This is how you establish on-brand defaults (e.g. every new Button starts as your brand button). It does not restyle modules that already exist.
wppilot/divi-set-display-conditionsSet Divi Display ConditionsSets the display (visibility) conditions on the module at "address" — show/hide it by login status, role, post/term, date, device, cookie, WooCommerce state, etc. "conditions" is a list; each item is {conditionName, settings, operator?}. "conditionName" is a type from wppilot/divi-list-condition-types; "settings" holds that type's "displayRule" plus its extra keys; "operator" ("OR" default, or "AND") joins it to the next condition. Replaces the module's current condition list. Example: [{"conditionName":"loggedInStatus","settings":{"displayRule":"loggedIn"}}] shows the module only to logged-in visitors. Accepts the post id as "post" or "post_id".
wppilot/divi-set-global-fontsSet Divi Global FontsSets Divi's site-wide global fonts. Provide any of: heading_font / body_font (font family names, e.g. "Poppins", "Inter"), heading_font_weight / body_font_weight (e.g. "700"), body_font_size (e.g. "17px"), body_font_height (line-height, e.g. "1.7em"), tablet_body_font_size, phone_body_font_size. Only the fields you provide are changed; an empty string restores the Divi default for that field. Applies site-wide on the front end. For per-module fonts use wppilot/divi-edit-module; for reusable color/spacing tokens use the global-color / variable abilities.
wppilot/divi-set-interactionsSet Divi InteractionsSets the interactions (motion) on the module at "address": a trigger on the module runs an effect on the module itself (self-target). "interactions" is a list; each item is {trigger, effect, settings?}. "trigger" and "effect" are ids from wppilot/divi-list-interaction-types; "settings" holds the effect/trigger-specific keys (e.g. sensitivity + mouseMovementType for mirrorMouseMovement, breakpointName for breakpoint triggers, timeDelay for any). Replaces the module's current interactions. Interactions are desktop-only (not responsive). Example: [{"trigger":"onClick","effect":"toggleVisibility"}] toggles the module when clicked. Accepts the post id as "post" or "post_id".
wppilot/divi-set-theme-builder-conditionsSet Divi Theme Builder ConditionsChanges where an existing Theme Builder template applies and/or whether it is enabled. Identify it by "template_id" (from wppilot/divi-list-theme-builder-templates). "use_on" and "exclude_from" each REPLACE the template's current condition list (ids from wppilot/divi-list-theme-builder-conditions); "enabled" toggles it on/off. Takes effect immediately.

Destructive

Marked destructive in the source, so each call needs an explicit confirmation flag, every time.

AbilityWhat it does
wppilot/divi-delete-global-colorDelete Divi Global ColorDeletes a custom global color by id (a "gcid-…"). The five built-in theme colors (primary/secondary/heading/body/link) cannot be deleted — edit their value instead. Elements still bound to a deleted color keep the last value Divi resolved for it.
wppilot/divi-delete-global-presetDelete Divi Global PresetPermanently deletes a global preset. Identify it by "module" and "preset_id" (from wppilot/divi-list-global-presets). Modules that referenced it keep their own attributes and simply stop inheriting the preset; if the deleted preset was the type's default, the default is cleared.
wppilot/divi-delete-library-itemDelete Divi Library ItemDeletes a saved Divi Library item by "library_id" (from wppilot/divi-list-library-items). Pages where it was already inserted keep their copy.
wppilot/divi-delete-moduleDelete Divi ModuleRemoves a module and all of its descendants from a post's Divi 5 tree by address (e.g. "0/1"). Returns how many modules were removed. Addresses of later siblings shift down after a delete — re-read with wppilot/divi-get-content before further edits. Accepts the post id as "post" or "post_id".
wppilot/divi-delete-theme-builder-templateDelete Divi Theme Builder TemplateDeletes a Theme Builder template by "template_id" (from wppilot/divi-list-theme-builder-templates), unlinking it from the Theme Builder. By default its header/body/footer layout posts are deleted too; pass "delete_layouts": false to keep them.
wppilot/divi-delete-variableDelete Divi VariableDeletes a design token by id (a "gvid-…"). Anything still referencing it falls back to the last value Divi resolved. Built-in font variables cannot be deleted.
wppilot/divi-set-contentSet Divi ContentReplaces a post's entire Divi 5 module tree from a nested list of modules. Each module is {name, attrs?, children?} where name is a divi/* module (the "divi/" prefix is optional), attrs is the module attributes object, and children is a nested list. The tree must follow the structural skeleton divi/section > divi/row > divi/column > leaf modules. Module names and nesting are validated. Raw-HTML code modules (divi/code, divi/fullwidth-code) are rejected unless you pass the explicit opt-in "allow_code_modules": true — style pages via module.decoration.* attrs, global presets, and global colors/variables instead (see divi-get-style-schema); a tree made up only of code modules is always rejected. Content HTML carrying inline style="…" attributes is likewise rejected unless you pass the explicit opt-in "allow_inline_styles": true — style via the module's native attrs instead. Accepts the post id as "post" or "post_id". This overwrites all existing content; use the *-module abilities for targeted edits.