Skip to main content
Glama
Berrio
by Berrio

elements_update

Destructive

Applies typed, allowlisted patches to update SVG geometry, styles, text, and layer labels while enforcing revision checks and safe workspace bounds.

Instructions

Updates bounded SVG geometry, basic styles, text, or layer labels through typed allowlisted patches.

Input Schema

NameRequiredDescriptionDefault
pathYes
elementsYes
workspaceIdYes
expectedRevisionYes

Output Schema

NameRequiredDescriptionDefault
idsYes
revisionYes
backupCreatedYes
reroutedConnectorIdsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed26 schema fields changedv0.1.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / elements / items / additionalProperties
      Added value: +false
    • changedInput schema / properties / elements / items / properties / geometry / oneOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "height": {
      -        "exclusiveMinimum": 0,
      -        "type": "number"
      -      },
      -      "kind": {
      -        "const": "rect",
      -        "type": "string"
      -      },
      -      "rx": {
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "ry": {
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "width": {
      -        "exclusiveMinimum": 0,
      -        "type": "number"
      -      },
      -      "x": {
      -        "type": "number"
      -      },
      -      "y": {
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "kind"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "cx": {
      -        "type": "number"
      -      },
      -      "cy": {
      -        "type": "number"
      -      },
      -      "kind": {
      -        "const": "circle",
      -        "type": "string"
      -      },
      -      "r": {
      -        "exclusiveMinimum": 0,
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "kind"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "cx": {
      -        "type": "number"
      -      },
      -      "cy": {
      -        "type": "number"
      -      },
      -      "kind": {
      -        "const": "ellipse",
      -        "type": "string"
      -      },
      -      "rx": {
      -        "exclusiveMinimum": 0,
      -        "type": "number"
      -      },
      -      "ry": {
      -        "exclusiveMinimum": 0,
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "kind"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "kind": {
      -        "const": "line",
      -        "type": "string"
      -      },
      -      "x1": {
      -        "type": "number"
      -      },
      -      "x2": {
      -        "type": "number"
      -      },
      -      "y1": {
      -        "type": "number"
      -      },
      -      "y2": {
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "kind"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "kind": {
      -        "const": "polygon",
      -        "type": "string"
      -      },
      -      "points": {
      -        "items": {
      -          "properties": {
      -            "x": {
      -              "type": "number"
      -            },
      -            "y": {
      -              "type": "number"
      -            }
      -          },
      -          "required": [
      -            "x",
      -            "y"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 1000,
      -        "minItems": 2,
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "kind"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "kind": {
      -        "const": "polyline",
      -        "type": "string"
      -      },
      -      "points": {
      -        "items": {
      -          "properties": {
      -            "x": {
      -              "type": "number"
      -            },
      -            "y": {
      -              "type": "number"
      -            }
      -          },
      -          "required": [
      -            "x",
      -            "y"
      -          ],
      -          "type": "object"
      -        },
      -        "maxItems": 1000,
      -        "minItems": 2,
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "kind"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "kind": {
      -        "const": "text",
      -        "type": "string"
      -      },
      -      "x": {
      -        "type": "number"
      -      },
      -      "y": {
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "kind"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "height": {
      +        "exclusiveMinimum": 0,
      +        "type": "number"
      +      },
      +      "kind": {
      +        "const": "rect",
      +        "type": "string"
      +      },
      +      "rx": {
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "ry": {
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "width": {
      +        "exclusiveMinimum": 0,
      +        "type": "number"
      +      },
      +      "x": {
      +        "type": "number"
      +      },
      +      "y": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "kind"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "cx": {
      +        "type": "number"
      +      },
      +      "cy": {
      +        "type": "number"
      +      },
      +      "kind": {
      +        "const": "circle",
      +        "type": "string"
      +      },
      +      "r": {
      +        "exclusiveMinimum": 0,
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "kind"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "cx": {
      +        "type": "number"
      +      },
      +      "cy": {
      +        "type": "number"
      +      },
      +      "kind": {
      +        "const": "ellipse",
      +        "type": "string"
      +      },
      +      "rx": {
      +        "exclusiveMinimum": 0,
      +        "type": "number"
      +      },
      +      "ry": {
      +        "exclusiveMinimum": 0,
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "kind"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "kind": {
      +        "const": "line",
      +        "type": "string"
      +      },
      +      "x1": {
      +        "type": "number"
      +      },
      +      "x2": {
      +        "type": "number"
      +      },
      +      "y1": {
      +        "type": "number"
      +      },
      +      "y2": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "kind"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "kind": {
      +        "const": "polygon",
      +        "type": "string"
      +      },
      +      "points": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "x": {
      +              "type": "number"
      +            },
      +            "y": {
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "x",
      +            "y"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 1000,
      +        "minItems": 2,
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "kind"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "kind": {
      +        "const": "polyline",
      +        "type": "string"
      +      },
      +      "points": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "x": {
      +              "type": "number"
      +            },
      +            "y": {
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "x",
      +            "y"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 1000,
      +        "minItems": 2,
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "kind"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "kind": {
      +        "const": "text",
      +        "type": "string"
      +      },
      +      "x": {
      +        "type": "number"
      +      },
      +      "y": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "kind"
      +    ],
      +    "type": "object"
      +  }
      +]
    • addedInput schema / properties / elements / items / properties / style / additionalProperties
      Added value: +false
    • addedInput schema / properties / elements / items / properties / style / properties / classes
      Added value: +{
      +  "items": {
      +    "pattern": "^[A-Za-z_][A-Za-z0-9_-]{0,63}$",
      +    "type": "string"
      +  },
      +  "maxItems": 32,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / elements / items / properties / style / properties / display
      Added value: +{
      +  "enum": [
      +    "inline",
      +    "none"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / elements / items / properties / style / properties / fill / pattern
      Previous value: -"^#[a-fA-F0-9]{6}$"New value: +"^(?:none|#[a-fA-F0-9]{6})$"
    • addedInput schema / properties / elements / items / properties / style / properties / fillOpacity
      Added value: +{
      +  "maximum": 1,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / elements / items / properties / style / properties / fillRule
      Added value: +{
      +  "enum": [
      +    "nonzero",
      +    "evenodd"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / elements / items / properties / style / properties / fontStyle
      Added value: +{
      +  "enum": [
      +    "normal",
      +    "italic",
      +    "oblique"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / elements / items / properties / style / properties / fontWeight / anyOf
      Added value: +[
      +  {
      +    "enum": [
      +      "normal",
      +      "bold"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "maximum": 900,
      +    "minimum": 100,
      +    "type": "integer"
      +  }
      +]
    • removedInput schema / properties / elements / items / properties / style / properties / fontWeight / enum
      Removed value: -[
      -  "normal",
      -  "bold"
      -]
    • removedInput schema / properties / elements / items / properties / style / properties / fontWeight / type
      Removed value: -"string"
    • addedInput schema / properties / elements / items / properties / style / properties / letterSpacing
      Added value: +{
      +  "maximum": 10000,
      +  "minimum": -10000,
      +  "type": "number"
      +}
    • addedInput schema / properties / elements / items / properties / style / properties / locked
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / elements / items / properties / style / properties / paintOrder
      Added value: +{
      +  "enum": [
      +    "normal",
      +    "fill stroke markers",
      +    "stroke fill markers"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / elements / items / properties / style / properties / stroke / pattern
      Previous value: -"^#[a-fA-F0-9]{6}$"New value: +"^(?:none|#[a-fA-F0-9]{6})$"
    • addedInput schema / properties / elements / items / properties / style / properties / strokeDasharray
      Added value: +{
      +  "items": {
      +    "maximum": 100000,
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  "maxItems": 32,
      +  "type": "array"
      +}
    • addedInput schema / properties / elements / items / properties / style / properties / strokeLineCap
      Added value: +{
      +  "enum": [
      +    "butt",
      +    "round",
      +    "square"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / elements / items / properties / style / properties / strokeLineJoin
      Added value: +{
      +  "enum": [
      +    "miter",
      +    "round",
      +    "bevel"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / elements / items / properties / style / properties / strokeMiterLimit
      Added value: +{
      +  "maximum": 100000,
      +  "minimum": 1,
      +  "type": "number"
      +}
    • addedInput schema / properties / elements / items / properties / style / properties / strokeOpacity
      Added value: +{
      +  "maximum": 1,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / elements / items / properties / style / properties / visibility
      Added value: +{
      +  "enum": [
      +    "visible",
      +    "hidden"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / elements / items / properties / style / properties / wordSpacing
      Added value: +{
      +  "maximum": 10000,
      +  "minimum": -10000,
      +  "type": "number"
      +}
    • addedOutput schema / properties / reroutedConnectorIds
      Added value: +{
      +  "items": {
      +    "pattern": "^[A-Za-z_][A-Za-z0-9_.-]{0,127}$",
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "backupCreated",
      -  "ids",
      -  "revision"
      -]New value: +[
      +  "backupCreated",
      +  "ids",
      +  "reroutedConnectorIds",
      +  "revision"
      +]
  2. First observedv0.0.0

TDQS

C2.9/5.0
Behavior3/5

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

Only destructiveHint=true is annotated, and the description usefully adds that patches are 'bounded' and 'allowlisted', telling the agent the mutation surface is limited rather than arbitrary. However, it omits the two behaviors that matter most here: optimistic concurrency via expectedRevision (what happens on a stale revision) and whether unspecified fields are preserved.

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?

A single front-loaded sentence with no filler, and the updateable categories are listed before the mechanism. Efficient, though the terseness is arguably at the edge given the payload complexity.

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?

For a four-parameter, revision-gated mutation with nested geometry/style objects and a destructive hint, one sentence is thin. The output schema covers return values, but concurrency semantics, partial-update behavior, and element/batch limits are absent.

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?

Schema description coverage is 0%, so the description carries the full burden. It loosely maps to elements[].geometry/.style/.text/.label, which helps, but it says nothing about path, workspaceId, or expectedRevision — the revision token is required and completely unexplained, leaving the agent without the concurrency contract it needs to call this correctly.

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?

Names a specific verb (Updates) and enumerates the resource surface (SVG geometry, basic styles, text, layer labels), and adds the mechanism (typed allowlisted patches) so an agent can distinguish it from broader transforms like elements_transform. It stops short of naming a sibling or stating what it is not, so it lands at 4 rather than 5.

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

Usage Guidelines2/5

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

No when-to-use guidance at all: it does not say when to prefer this over elements_transform, elements_arrange, path_node_edit, or text_manage, nor does it state prerequisites such as needing a current revision or a valid workspace path. The agent is left to infer routing entirely.

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

Deploy Server

Other Tools