Skip to main content
Glama

update_elements

Patch existing Excalidraw elements by ID to change properties, re-measure text, move bound labels and arrows, and sync edits to live collaborators; other agents' elements are protected unless forced.

Instructions

Patch existing elements by id. 'set' is merged over the element; version and nonce are bumped. 'set' accepts any element field, including link (a URL, or null to remove it). Changing 'text' or 'fontSize' on a text element re-measures it unless width/height are given, keeps originalText in step, and, for a label bound to a shape, re-centres it and grows the shape to fit so the canvas redraws the new label. Changing 'x', 'y', 'width' or 'height' carries the element's bound label with it and re-computes the endpoint of every arrow bound to it, leaving each arrow's other end alone; use translate_elements to move a shape with its group, its frame's children and the arrows between moved shapes. An element another agent in the room drew is left alone and reported as refused unless force is true; a person's elements and those of an agent that has left are never guarded. The change reaches connected peers immediately and the room's stored copy shortly after; a result line beginning NOT PERSISTED means the stored copy is behind and the server is retrying in the background.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoEdit elements another agent in the room drew anyway. Without it those ids are skipped and reported as refused, so the agent still working on them keeps a true picture of the scene.
updatesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.1
    • addedInput schema / properties / force
      Added value: +{
      +  "default": false,
      +  "description": "Edit elements another agent in the room drew anyway. Without it those ids are skipped and reported as refused, so the agent still working on them keeps a true picture of the scene.",
      +  "type": "boolean"
      +}
  2. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and discharges it: merge-over-'set' semantics, version/nonce bump, re-measure rules for text/fontSize, originalText syncing, label re-centring and shape growth, arrow endpoint recomputation with the other end untouched, ownership guarding of live agents' elements but not people's or departed agents', immediate peer propagation vs delayed persistence, and the NOT PERSISTED signal. This is unusually rich disclosure of side effects and failure modes.

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?

Front-loaded with the core action, then layers constraints in a logical order (merge → side effects → conflicts → propagation). The single paragraph is long and packs multiple semicolon-chained behaviors, which is justified by the complexity but slightly dense for skimming.

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

Completeness5/5

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

No output schema exists, yet the description still explains the result contract (refused lines, NOT PERSISTED meaning retry in background), which is exactly what the missing output schema leaves unstated. For a two-parameter mutation tool this covers everything an agent needs to invoke it correctly.

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 only 50% (only 'force' is described in the schema), but the description compensates by defining what 'set' accepts — any element field, including link as a URL or null to remove — and by explaining the exact merge/bump semantics of that object. It does not enumerate id/set structure beyond that, so it stops just short of a 5.

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?

Opens with a specific verb+resource ('Patch existing elements by id') and immediately scopes the operation to existing elements, distinguishing it from add_elements/delete_elements. The collision-prone sibling translate_elements is named explicitly later, so the agent can route correctly without opening schemas.

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?

Gives an explicit when-to-use-this-vs-alternative rule: use translate_elements to move a shape with its group, its frame's children and the arrows between moved shapes. It also states the exact condition under which edits are refused and that force overrides it.

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