Skip to main content
Glama
elementor-mcp

elementor-mcp

by heaventree

Replace a page's entire layout

elementor_replace_page_tree
Destructive

Replace an entire Elementor page’s element tree to generate a new layout from scratch. This overwrites all existing content and takes a snapshot first; use batch editing for existing-page edits.

Instructions

Overwrite a page's whole element tree. This discards the existing layout completely, so reach for it when generating a page from scratch rather than to make a change. A snapshot is taken first. For edits to an existing page use elementor_batch_edit instead.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "postId": "<postId>",
      "elements": "<elements>"
    },
    "name": "elementor_replace_page_tree"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteNoConfigured site name. Omit to use the default site.
labelNo
postIdYesWordPress post ID of the Elementor page, post or template.
confirmNoMust be true — this replaces everything on the page.
elementsYesThe complete new element tree. An empty array clears the page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructiveHint=true and openWorldHint=true, so the safety profile is carried structurally; the description still adds real value by spelling out that the existing layout is discarded completely and that a snapshot is taken first, giving the agent both the blast radius and a recovery path. It stops short of noting that the confirm flag must be set true for the call to proceed, which is the one behavioral detail left to the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences, front-loaded with the destructive action followed by the recovery fact and the alternative. No filler; only mild compression could tighten it further.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, no-output-schema tool, the definition covers the essential decision inputs: what is destroyed, that a snapshot precedes it, and where to go for edits. The confirm requirement is left entirely to the schema, a minor but real gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 80%, so postId, confirm, and elements are already documented in the schema itself. The description adds only the general notion of supplying a complete tree and does not clarify label or site beyond what the schema states, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Overwrite a page's whole element tree") and immediately scopes it as a full replacement rather than an incremental change, which cleanly separates it from elementor_batch_edit and the add/delete element siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when to reach for it ("generating a page from scratch"), when not to ("rather than to make a change"), and names the alternative tool for the other case (elementor_batch_edit). This is exactly the when/when-not/alternative pattern that removes ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.