mcp-elementor__elementor-build-composition
SITE PARTS (Pro)
If the user asks about a header, footer, 404, single, archive, or search-results, that content lives in a SEPARATE document — not the current page. Call elementor/list-site-parts (or elementor/manage-site-parts to create) first to get the correct post_id, then invoke this tool on that id. This capability requires Elementor Pro; skip when the site-parts tools are not registered. Read [elementor://wordpress/best-practices] for repeating-layout patterns (one single template driven by dynamic data — not N duplicated pages).
RESOURCES (Read before use)
[elementor://wordpress/best-practices] - Opinionated WordPress patterns: repeating layouts, condition scoping, Post Content placement, dynamic tags
[elementor://global-classes] - Reusable CSS classes from the active kit, ordered from highest to lowest CSS priority; check FIRST before adding inline styles
[elementor://global-variables] - Design tokens from the active kit; use labels in CSS as
var(--label)or `var(--label, fallback… Through Royally: waits for a person to approve it in Royally; nothing on the site changes until then. This connection has no undo; Royally recorded the change but cannot reverse it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | append (default) inserts under parent_id; replace_children removes existing direct children of parent_id first, then inserts. | append |
| style | No | Record mapping configuration-id → plain CSS string. Supports &:hover/&:focus/&:active nesting and @media(--breakpoint) blocks. Keys MUST match configuration-id attributes in xml_structure. | |
| classes | No | Record mapping configuration-id → list of existing global class labels to attach to that element. Create classes first via elementor/manage-classes. | |
| dry_run | No | If true, validate and return resolved tree without persisting. | |
| post_id | Yes | WordPress post ID of the document to mutate. | |
| site_id | No | Site to run this tool on: 8ef2e52b-bd07-4671-a363-ebe8b480b65c (https://demo.royalplugins.com) | |
| parent_id | No | ID of the parent container. Omit to insert at document root. | document |
| interactions | No | Record mapping configuration-id → array of interaction items in the native shape. Read elementor://interactions/schema for the full shape and allowed enum values. Send [] for a configuration-id to clear its interactions. | |
| xml_structure | Yes | Valid XML structure with custom Elementor widget tags. Every element MUST have a unique configuration-id attribute (e.g. <e-heading configuration-id="hero-title"></e-heading>). No attributes, classes, IDs, or text nodes in XML. | |
| element_config | No | Record mapping configuration-id → plain widget settings matching elementor://widgets/schema/{type}. Keys MUST match configuration-id attributes in xml_structure. For <e-component> configuration-ids, the value is { component_id: int, overrides?: {<override_key>: <plain value>} } — see elementor/list-components. |