Insert Breakdance Element
Adds an element to a Breakdance page by copying an element already on that page (with everything inside it), giving the copy new ids, optionally new text, and placing it right after the original or at a position you choose in a parent of the same type. Elements are copied rather than built from scratch because Breakdance does not publish the full structure of a new element, and a copy is known to be one it renders. Changes the live page; the previous layout is kept as a backup whose restore steps are returned. Call mosmcp/breakdance-read-page-layout first for the element ids and the layout_hash.
Also known as: add a Breakdance section, duplicate element, add another button, copy a block.
| Property | Value |
|---|---|
| Ability slug | mosmcp/breakdance-insert-element |
| Wire tool name | mosmcp__breakdance-insert-element |
| Category | Breakdance (mosmcp-breakdance) |
| Plan | Pro |
Required access
| Requirement | Value |
|---|---|
| Capability | edit_posts |
| Minimum default role | Contributor |
| Annotations | readOnly: false · destructive: false · idempotent: false · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| post_id | integer (min 1) | Yes | — | The ID of the page, post or Breakdance template. |
| expected_hash | string | Yes | — | The layout_hash from your latest mosmcp/breakdance-read-page-layout of this post. The change is refused if the layout was saved since, so nobody's edit is overwritten. |
| source_node_id | integer (min 1) | Yes | — | The id of the element to copy, from mosmcp/breakdance-read-page-layout. |
| parent_node_id | integer (min 1) | — | Optional. The element to put the copy in; it must be the same type as the original's parent. Defaults to the original's parent. | |
| position | integer (min 0) | — | Optional. Zero-based position among the parent's children. Defaults to right after the original (or last, in another parent). | |
| content_changes | object[] | — | Optional. Text and link settings to change on the copy itself, as paths listed under "content" for the original element. | |
| content_changes[].path | string (min length 1) | Yes | — | Setting path, dot-separated, exactly as listed by mosmcp/breakdance-read-page-layout. |
| content_changes[].value | string | Yes | — | The new text or link. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| post_id | integer | Yes | |
| title | string | ||
| layout_hash | string | Yes | The new layout_hash, usable as expected_hash for a following change. |
| previous_hash | string | ||
| changes | object[] | Yes | What changed, read back from the saved layout. |
| changes[].action | string | ||
| changes[].node_id | integer | The new element's id. | |
| changes[].type | string | ||
| changes[].parent_id | integer | ||
| changes[].position | integer | ||
| changes[].cloned_from | integer | ||
| changes[].new_ids | integer[] | Ids given to the new element and everything inside it. | |
| changes[].content | object[] | ||
| backup | object | Yes | |
| backup.backup_id | string | ||
| backup.stored_in | string | The post meta key holding the backup. | |
| backup.created | string | ||
| backup.restore | string | How to put the previous layout back. | |
| view_url | string | ||
| edit_url | string | ||
| notes | string[] | ||
| warnings | object[] | Non-fatal issues encountered while running. | |
| warnings[].code | string | ||
| warnings[].message | string | ||
| warnings[].context | string |
| << Previous | Next >> |
|---|---|
| Read Breakdance Page Layout |
For more information about the Secure MCP Server for WordPress plugin, explore the following resources:
Product Overview | Pricing | Try for Free | Documentation
If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.