diviDivi Abilities
Page building integration. Visual layout of pages and posts through a builder.
edit_posts 5Available Tools (5)
divi_get_page_outlineedit_postsRead the structural outline of a Divi-built post or page without rendering it. Supports legacy Divi 4 et_pb_* shortcode layouts and native Divi 5 divi/* block markup. Returns one positional path model across both formats, plus raw module names, labels, short text snippets, and explicit opaque/unsupported segments. Paths are dot-separated 0-based indices and can shift after the page changes. Divi 5 attributes are passed through verbatim because their internal schema is not a stable public contract. Read-only; requires edit_posts generally and read_post on the target.
Parameter Schema2 parameters
{
"type": "object",
"properties": {
"post_id": {
"type": "integer",
"description": "Post or page ID to inspect."
},
"depth": {
"type": "integer",
"description": "Maximum outline nesting depth. Default 6, max 20."
}
},
"required": [
"post_id"
]
}divi_get_moduleedit_postsRead one Divi node by its positional path from divi_get_page_outline. For Divi 4, attributes are literal shortcode strings; for Divi 5, block attrs are returned verbatim; mixed legacy regions remain opaque rather than being interpreted under a second path space. A valid path that no longer resolves returns found=false. Read-only; requires edit_posts generally and read_post on the target.
Parameter Schema2 parameters
{
"type": "object",
"properties": {
"post_id": {
"type": "integer",
"description": "Post or page ID to inspect."
},
"path": {
"type": "string",
"description": "Dot-separated 0-based path, e.g. \"0.2.1\"."
}
},
"required": [
"post_id",
"path"
]
}divi_replace_moduleDestructiveReplace one addressed Divi node as a whole. On Divi 4, markup must be exactly one balanced et_pb_* shortcode subtree; untouched post_content bytes are preserved. On Divi 5, markup must be exactly one divi/* block and survives a serialize-reparse check before writing. Requires expected_type because positional paths shift. Mixed legacy wrappers remain opaque but may be replaced as one advertised D5 node. Supports dry_run and emits an undo token. Requires edit_post on the target.
Parameter Schema5 parameters
{
"type": "object",
"properties": {
"post_id": {
"type": "integer",
"description": "Post or page ID to modify."
},
"path": {
"type": "string",
"description": "Current dot-separated 0-based path, e.g. \"0.2.1\"."
},
"expected_type": {
"type": "string",
"description": "Guard: abort unless the current node at path has this exact shortcode tag or block name."
},
"dry_run": {
"type": "boolean",
"description": "Preview and validate without writing, snapshotting, or invalidating caches. Default false."
},
"markup": {
"type": "string",
"description": "One complete D4 et_pb_* shortcode subtree or one complete D5 divi/* block, matching the target page format."
}
},
"required": [
"post_id",
"path",
"expected_type",
"markup"
]
}divi_insert_moduleDestructiveInsert one whole Divi node before, after, or as the first/last child of an addressed node. Markup must be one balanced D4 et_pb_* subtree or one D5 divi/* block. Child insertion is refused for D4 leaves/opaque nodes and D5 opaque wrappers; before/after insertion may use an advertised opaque D5 wrapper as the reference. Requires expected_type because paths shift. Supports dry_run and emits an undo token. Requires edit_post on the target.
Parameter Schema6 parameters
{
"type": "object",
"properties": {
"post_id": {
"type": "integer",
"description": "Post or page ID to modify."
},
"path": {
"type": "string",
"description": "Current dot-separated 0-based path, e.g. \"0.2.1\"."
},
"expected_type": {
"type": "string",
"description": "Guard: abort unless the current node at path has this exact shortcode tag or block name."
},
"dry_run": {
"type": "boolean",
"description": "Preview and validate without writing, snapshotting, or invalidating caches. Default false."
},
"position": {
"type": "string",
"enum": [
"before",
"after",
"first_child",
"last_child"
],
"description": "Placement relative to the addressed reference node."
},
"markup": {
"type": "string",
"description": "One complete D4 et_pb_* shortcode subtree or one complete D5 divi/* block."
}
},
"required": [
"post_id",
"path",
"expected_type",
"position",
"markup"
]
}divi_delete_moduleDestructiveDelete one addressed Divi node with all descendants. A D5 opaque legacy wrapper may be deleted at its advertised path, while descendants beneath it remain unaddressable. D4 malformed/opaque nodes are refused because they do not have a reliable subtree boundary. Requires expected_type because paths shift. Supports dry_run and emits an undo token. Requires edit_post on the target.
Parameter Schema4 parameters
{
"type": "object",
"properties": {
"post_id": {
"type": "integer",
"description": "Post or page ID to modify."
},
"path": {
"type": "string",
"description": "Current dot-separated 0-based path, e.g. \"0.2.1\"."
},
"expected_type": {
"type": "string",
"description": "Guard: abort unless the current node at path has this exact shortcode tag or block name."
},
"dry_run": {
"type": "boolean",
"description": "Preview and validate without writing, snapshotting, or invalidating caches. Default false."
}
},
"required": [
"post_id",
"path",
"expected_type"
]
}