Skip to content

Layout & Structure

EMCP Tools is container-first. Every layout tool operates on modern Elementor flexbox containers, not the legacy section/column system. Existing pages built with sections still work, but new builds should use containers.

Adds a new flexbox container, either top-level (direct child of the page) or nested inside an existing container.

Input:

  • post_id
  • parent_id: omit for top-level
  • position: child index, -1 to append (default)
  • settings, partial container settings: flex_direction, content_width, padding, gap, etc.
  • full_bleed: (new in v3.2.1) when true, seed an edge-to-edge recipe (full content width, 100% width, zero padding, zero flex/gap, column + stretch). Use for the top-level container on Elementor Canvas pages, where the boxed defaults otherwise leave white strips around headers, footers and full-width sections. Any explicit settings you pass still override the preset.

Returns: { element_id }.

Updates settings on an existing container. Same shape as add-container minus position/parent.

Returns the JSON Schema for container settings. Use this before constructing complex layout settings to know which keys are valid.

Moves an element to a new parent and/or position.

Input: post_id, element_id, new_parent_id, new_position.

Removes an element and all its children. Destructive. Capability check is edit_post on the parent.

Input: post_id, element_id.

Deep-copies an element with fresh IDs and inserts it right after the original.

Input: post_id, element_id. Returns: { new_element_id }.

Searches a page for elements matching a query: by type, settings value, or CSS class.

Input:

  • post_id
  • elType: container, widget
  • widgetType: when elType is widget
  • css_class: match elements with this class in their CSS classes setting
  • settings_match: partial object that must be present in the element’s settings

Returns: array of { element_id, elType, widgetType?, path }.

Updates settings on any element (container or widget) by ID. Generic write tool: the AI’s go-to for “change setting X on element Y.”

Input: post_id, element_id, settings (partial, merged into existing).

Applies multiple update-element operations in a single MCP call. Significant token savings when an AI is refining many elements after a build-page.

Input:

  • post_id
  • updates: array of { element_id, settings } pairs

Reorders the direct children of a container.

Input:

  • post_id
  • container_id
  • child_order: array of child element IDs in the new desired order

Container behavior for row layouts (children laid out side-by-side) has a few rules that trip up agents otherwise. The plugin enforces these automatically:

  • Don’t set flex_wrap on any container. It’s stripped at save time. Elementor’s defaults handle wrapping.
  • Don’t set _flex_size: 'grow' on row children: causes overflow. Use percentage widths instead.
  • Row children get content_width: 'full' automatically, with calculated percentage widths (e.g. 25% for 4 columns, 33.33% for 3, 50% for 2).
  • Top-level containers default to content_width: 'boxed', row children to 'full'.

If you’re constructing settings by hand (rare), these defaults match what build-page produces.