Skip to main content
Glama

Get Element Layout Context

elementor_get_element_context
Read-onlyIdempotent

Retrieves an Elementor element with its own settings, ancestor container layout settings and mobile variants, plus sibling summaries to debug layout and spacing issues.

Instructions

Get an element with full layout context: its own settings, all ancestor containers' layout settings (flex_direction, width, overflow, gap, margin, padding + mobile variants), and sibling element summaries. Essential for debugging layout and spacing issues.

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>",
      "elementId": "<elementId>"
    },
    "name": "elementor_get_element_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
postIdYesWordPress post/page ID
elementIdYesElementor element ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is fully covered and the description only needs to add payload context. It does add value by enumerating what 'full layout context' contains (flex_direction, width, overflow, gap, margin, padding, mobile variants, sibling summaries), but says nothing about response size, traversal depth limits, or behavior when ancestors lack layout settings.

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?

Two sentences, front-loaded with the core action and followed by the use case. The parenthetical property list is dense but each item is load-bearing detail rather than filler.

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?

With no output schema, the description carries the burden of explaining return content and does so at a category level (own settings, ancestor layout settings with named properties, sibling summaries). It is nearly complete; only the sibling summary shape and any depth or size limits are unspecified.

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 coverage is 100% with both postId and elementId fully described, so the baseline of 3 applies. The description does not add syntax, format, or lookup guidance for elementId (e.g., where to obtain it), leaving it entirely to the schema.

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

Purpose4/5

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

States a specific verb and resource ('Get an element') and qualifies scope precisely: the element's own settings plus ancestor container layout settings plus sibling summaries. That scope definition implicitly separates it from a plain element fetch (elementor_get_element), though no sibling is named.

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

Usage Guidelines4/5

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

'Essential for debugging layout and spacing issues' gives a clear condition for reaching for this tool over a basic element read. It stops short of explicit exclusions or naming the alternative tool to use for simple reads, so it is context-rich but not fully routing.

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