Skip to main content
Glama

Update layers

canvas-update_nodes
Destructive

Batch property patches, one undoable transaction — the surgical alternative to resending HTML. Each patch is a partial SceneNode; editable keys: name, x, y, w, h, rotation, opacity, fills, strokes, effects, radius {tl,tr,br,bl}, blendMode, clipsContent, layout (auto-layout; null removes it), layoutAbsolute, sizingH/sizingV (fixed|hug|fill), constraintH/constraintV, text {content, fontFamily, fontSize, fontWeight, lineHeight, letterSpacing, align, valign, autoResize, …}, points, innerRadius, svgPath, locked, hidden, flipH, flipV. Object fields (text, radius, layout, padding, margin) merge into the node's current value, so a patch names only what changes; arrays (fills, strokes, effects) replace. E.g. {"text":{"content":"Line one\nLine two"}} keeps the font; {"fills":[{"type":"image","assetId":"","mode":"fill"}]}. Structural fields (id, parentId, children, type) are rejected; nodes inside instances are rejected, and so is an instance's own size and look (w, h, fills, strokes, effects, radius, layout, clipsContent), which follow its master — edit the master. Invalid values are dropped and reported. Returns updated, rejected and the bounds of the updated nodes after layout; unmeasured lists any the canvas did not lay out (on another page, or far outside the view): those keep the model's sizes, which a hugging text or auto-layout frame there may not match until it is shown.

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": {
      "sessionId": "<sessionId>",
      "edits": "<edits>"
    },
    "name": "canvas-update_nodes"
  }
}

Input Schema

NameRequiredDescriptionDefault
editsYesOne entry per node
sessionIdYesThe artifact's id (its sessionId), from canvas-get_open or workspace-list_artifacts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only flag destructiveHint=true and readOnlyHint=false; the description goes far beyond by disclosing the transaction/undo model, merge-vs-replace semantics for object and array fields, which structural keys are rejected, the instance-master restriction, the silent-drop-and-report behavior for invalid values, and the fact that unmeasured nodes keep stale sizes. It also explains what the call returns, which annotations cannot convey.

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?

The key differentiator and transaction guarantee are front-loaded in the first clause, and every subsequent sentence carries operational information rather than filler. It is extremely dense — one long run-on listing keys and merge rules — which costs some readability, but nothing is truly redundant.

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?

There is no output schema, yet the description documents the return payload (updated, rejected, bounds, unmeasured) and explains the tricky unmeasured case. Together with the instance and structural rejection rules, an agent has everything needed to call this correctly and interpret results.

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 100%, and the patch parameter is a freeform object with additionalProperties, so the schema carries almost no semantic content — the description fills that gap by enumerating editable keys (name, x, y, sizing, constraints, text sub-fields, etc.) and their accepted values (fixed|hug|fill, radius corners). It does not spell out units or coordinate semantics for x/y/w/h, leaving a small residual gap despite the schema baseline.

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?

The opening clause states a specific verb and resource ('Batch property patches', 'one undoable transaction') and immediately differentiates from the sibling that resends markup ('the surgical alternative to resending HTML'). An agent can distinguish this from canvas-replace_html or canvas-insert_html without opening any 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 clearly frames when this tool is the right choice (surgical edits, partial patches) versus resending HTML, and gives a concrete usage example with the text-merge case. It also states exclusions that redirect the agent ('nodes inside instances are rejected... edit the master'), though it does not explicitly route to canvas-delete_nodes or canvas-duplicate_nodes for other kinds of changes.

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.