Skip to main content
Glama

update_element

Idempotent

Modify an Excalidraw element's position, size, label, or visual styling in one atomic update to keep diagram edits consistent.

Instructions

Update element position, size, label, or visual styling atomically.

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": {
      "element_id": "<element_id>"
    },
    "name": "update_element"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
labelNo
widthNo
heightNo
elbowedNo
opacityNo
frame_idNo
fillStyleNo
font_sizeNo
roughnessNo
roundnessNo
element_idYes
font_familyNo
strokeColorNo
strokeStyleNo
strokeWidthNo
routing_modeNo
backgroundColorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.5.0
    • changedInput schema / properties / backgroundColor / anyOf
      Previous value: -[
      -  {
      -    "pattern": "^(?:transparent|#[0-9A-Fa-f]{3,8})$",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "pattern": "^(?:transparent|#[0-9A-Fa-f]{3}|#[0-9A-Fa-f]{4}|#[0-9A-Fa-f]{6}|#[0-9A-Fa-f]{8})$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / routing_mode
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "auto",
      +        "straight",
      +        "orthogonal",
      +        "curved"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • changedInput schema / properties / strokeColor / anyOf
      Previous value: -[
      -  {
      -    "pattern": "^(?:transparent|#[0-9A-Fa-f]{3,8})$",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "pattern": "^(?:transparent|#[0-9A-Fa-f]{3}|#[0-9A-Fa-f]{4}|#[0-9A-Fa-f]{6}|#[0-9A-Fa-f]{8})$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed5 schema fields changedv0.4.0
    • changedInput schema / properties / backgroundColor / anyOf
      Previous value: -[
      -  {
      -    "pattern": "^(?:transparent|#[0-9A-Fa-f]{3}|#[0-9A-Fa-f]{4}|#[0-9A-Fa-f]{6}|#[0-9A-Fa-f]{8})$",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "pattern": "^(?:transparent|#[0-9A-Fa-f]{3,8})$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / element_id / pattern
      Removed value: -".*\\S.*"
    • changedInput schema / properties / font_family / anyOf
      Previous value: -[
      -  {
      -    "enum": [
      -      "excalifont",
      -      "sans-serif",
      -      "monospace",
      -      "comic-shanns",
      -      "handwriting"
      -    ],
      -    "type": "string"
      -  },
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / frame_id / anyOf
      Previous value: -[
      -  {
      -    "maxLength": 200,
      -    "minLength": 1,
      -    "pattern": ".*\\S.*",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 200,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / strokeColor / anyOf
      Previous value: -[
      -  {
      -    "pattern": "^(?:transparent|#[0-9A-Fa-f]{3}|#[0-9A-Fa-f]{4}|#[0-9A-Fa-f]{6}|#[0-9A-Fa-f]{8})$",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "pattern": "^(?:transparent|#[0-9A-Fa-f]{3,8})$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. Changed5 schema fields changedv0.3.0
    • addedInput schema / properties / height
      Added value: +{
      +  "anyOf": [
      +    {
      +      "exclusiveMinimum": 0,
      +      "maximum": 100000,
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / width
      Added value: +{
      +  "anyOf": [
      +    {
      +      "exclusiveMinimum": 0,
      +      "maximum": 100000,
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / x
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 100000,
      +      "minimum": -100000,
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / y
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 100000,
      +      "minimum": -100000,
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "element_id": {
      -      "type": "string"
      -    },
      -    "label_id": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    },
      -    "status": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "status",
      -    "element_id",
      -    "label_id"
      -  ],
      -  "type": "object"
      -}New value: +null
  4. First observedv0.2.1

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare idempotentHint=true, destructiveHint=false, and openWorldHint=false, so safety and repeatability are covered structurally. The description adds genuine value with "atomically," telling the agent the update is all-or-nothing rather than partially applied. It does not explain what happens to omitted fields, what a failed element_id produces, or whether the whole call fails on one invalid value.

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?

One front-loaded sentence with no filler; the verb and resource lead. It is efficient but so terse that concision shades into under-specification for a 19-parameter mutation.

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

Completeness2/5

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

A 19-param mutation tool with no output schema, no annotations covering mutation semantics, and no parameter documentation needs far more than one sentence. Missing are null-means-no-change semantics, the expected return value, and error behavior on unknown element_id, all of which an agent needs to call this correctly.

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

Parameters2/5

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

With 19 parameters and 0% schema description coverage, the description carries the full burden and only gestures at categories (position, size, label, styling). Crucially, 18 optional parameters default to null and the description never states whether null means "leave unchanged" — the single most important semantic for a partial-update tool. It also ignores element_id, frame_id, routing_mode, elbowed, and every color/pattern format constraint.

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 (update) and resource (element) plus the categories of fields it can change: position, size, label, visual styling. An agent knows exactly what the tool does. It never distinguishes itself from siblings like batch_mutate or create_shape, so it stops short of a 5.

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

Usage Guidelines3/5

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

The word "atomically" implies this is the single-element, all-or-nothing path as opposed to a batch operation, which is some implicit routing signal toward batch_mutate. There is no explicit when-to-use or when-not-to-use statement, and no mention of prerequisites such as the element already existing or needing to be inside a frame.

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