Skip to main content
Glama

Edit element

edit_element
Destructive

The editor’s element gestures, as one write (one version, one undo), refused for its reasons and in its words with nothing written. gesture "insert" adds node (your own element; its ids are minted here) or presetId (an Add panel card: describe_element_type (area design) {presets: true}) by targetNodeId: where "before"/"after" beside it, "inside" at its end; left out, the Add panel’s rule. Answers insertedId, parentId and index. presetId "table" takes rows (its words, the first row the header) to fill it in the same call. On nodeId (or nodeIds): duplicate (count: copies), delete, moveUp, moveDown, wrapInBox (put in a box; neighbours share one), unwrap (take a box or band apart, its contents kept in its place), makeColumns (count: equal columns), removeColumn, addColumn (on a row), addColumnBefore / addColumnAfter (on a column), insertRowAbove, insertRowBelow (count: rows). baseVersion: 409 when stale. Full reference: get_reference {topic:"layout"}; get_reference {topic:"elements"}.

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": {
      "siteId": "<siteId>",
      "pageId": "<pageId>",
      "gesture": "<gesture>"
    },
    "name": "edit_element"
  }
}

Input Schema

NameRequiredDescriptionDefault
nodeNoinsert: an element of your own (the shape apply_ops inserts; ids and empty props optional)
rowsNoinsert presetId "table" only: its rows, the first the header row, e.g. [["Dish","Price"],["Espresso","£2.50"]]
countNoduplicate: copies (default 1); insertRowAbove / insertRowBelow: rows; makeColumns: columns
whereNoinsert: beside or inside the target; left out: the Add panel’s rule
nodeIdNoThe element (or nodeIds); not for insert
pageIdYesPage id, or a reserved document ("site-header", "product-template"…)
siteIdYesSite id (from list_sites)
gestureYes
nodeIdsNoSeveral elements, in one write
presetIdNoinsert: an Add panel card by id or name, e.g. "features" or "three-points"
checkLinksNounwrap: also check other pages’ links to it
baseVersionNoThe version read; omitted = the current one
targetNodeIdNoinsert: the element it goes by (left out: the end of the page)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the annotations it discloses that all gestures commit as one atomic write (one version, one undo), that refusals come back with the API's own reasons and nothing written, that insert returns insertedId/parentId/index, and that baseVersion returns 409 when stale. It also explains side effects the annotations can't convey, such as unwrap keeping contents in place and wrapInBox letting neighbours share a box.

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?

Every clause carries information, with insert semantics front-loaded and gesture-by-gesture mappings packed into semicolon lists; there is essentially no filler. The telegraphic phrasing ('refused for its reasons and in its words with nothing written') is dense to the point of obscurity and makes the block harder to scan than it needed to be.

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 13-parameter, nested-object, no-output-schema mutation tool, the description covers all fourteen gestures, insert's return fields, atomicity, and conflict handling, and defers exhaustive detail to get_reference. It leaves out what non-insert gestures return and does not restate per-parameter caps (count max 10, nodeIds max 12), which the schema already supplies.

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

Parameters4/5

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

Schema coverage is already 92%, yet the description adds real mapping value: which parameter applies to which gesture (count for duplicate/insertRow*/makeColumns, where and targetNodeId for insert, rows only for presetId 'table'). Remaining params such as checkLinks and nodeIds limits are left to the schema, but the gesture-parameter binding is genuinely new information.

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?

The description names the resource (editor elements) and enumerates the concrete gestures it performs (insert, duplicate, delete, move, wrap, columns, rows), so an agent knows exactly what class of mutation this is. It stops short of explicitly differentiating itself from the low-level apply_ops sibling, which is only referenced obliquely via 'the shape apply_ops inserts' in the schema.

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?

It routes the agent per gesture: insert uses node or presetId with targetNodeId/where and defaults to the Add panel's rule; other gestures operate on nodeId or nodeIds, with target-type qualifiers ('on a row', 'on a column'). It also points to get_reference for layout/elements and to describe_element_type for presets. It never states when to prefer apply_ops or another write path instead, so the exclusion guidance is missing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources