Skip to main content
Glama

Change what is there

canvas_edit

Change things already on your open canvas, without repainting: everyone watching sees each change happen. edits, made in order:

  • {target: a name or key "b.i", set: {any op properties; null removes one}}: recolor, reshape, resize, rename, re-layer...

  • {target, move: {dx, dy}}: shift it (adds to its at).

  • {target, points: [...]}: change single points or pieces of a path, polygon, stroke or line, in its own coordinates (canvas_get lists its numbered points; each change applies to the result of the one before): {i, x, y} or {i, dx, dy} moves point i (a curve's handles move with it); {i, delete: true}; {after: i, x, y} adds a point; {segment: i, line: true} straightens the piece ending at point i; {segment: i, curve: [[x1, y1], [x2, y2]]} makes it a curve.

  • {target, order: "top"|"bottom"|"up"|"down"} or {target, order: {above: a name or key on the same layer}}: within its layer.

  • set {hidden: true} hides an object or part from everyone (kept, and listed); set {locked: true} locks it: every other edit to it, its parts or its group is refused until set {locked: null}. People hide and lock things in the layers panel: leave them as they are unless asked.

  • {target, delete: true}.

  • {target, detach: true}: an instance (a use, such as a placed part) becomes its own copy of its source as it looks now, its palette and kit baked in; it no longer follows the master.

  • {target, child: {id, set}} or {target, child: {id, delete: true}} edits one group child (id or its name). {target, child: {insert, before}} inserts before a child id. Use after to insert after it or omit both to append. canvas_get shows child IDs. A part's path as target ("balloon/flag", "head/eyes/open/lid-l": ids or names, as deep as groups nest) takes set, move, delete, child (when the part is a group) and order (among its group's parts, last drawn on top; {above: a sibling's id or name}).

  • {group: [names or keys], name}: makes them one named group, where the topmost was; their names become its parts' names. {target, ungroup: true}: a group's parts become objects again, in its place.

  • {targets: [names or keys], move: {dx, dy}, scale, rot, origin: [x, y]}: moves, scales and turns them together about one origin (default: the centre of their shared bounds).

  • {layer: "sky", opacity, blend, hidden, locked, order: "top"|"bottom"|"up"|"down"}: a layer's settings (makes the layer if it is new). Use before or after with an existing layer name to place it beside that layer. erase is a closed path to cut out (null clears it). Locked layers must be unlocked before editing their objects.

  • {layers: ["water", "fish"]} places named layers at the bottom in that order, creating any missing layers.

  • {kit: {colors: {brand: "#0a7cff", ink: "#14213d"}, fonts: {heading: "ui"}}}: the canvas's brand kit (added to what it has; null removes a name; replace: true starts it afresh). Or kit as a string of CSS custom properties from a site (":root { --brand: #0a7cff; --font-heading: 'Bebas Neue', sans-serif }"): colors and font families are taken, dark-mode rules become the kit's dark mode, other values are left out. styles: {name: {font, size, weight, lh, spacing}} are text styles; elevation: {raised: {dx, dy, blur, color, opacity}} are shadows an op names (shadow "raised") (text style: "name"); modes: {dark: {colors}} and mode: "dark" draw the canvas in a mode. A kept brand sets all of this at once: canvas_brand adopt. Or kit {url: "https://example.com"}: read from that web page (its HTML and up to 4 stylesheets, fetched once, never run): its custom properties under the site's own names, else the colors it uses most (page1, page2 ...), and its body and heading fonts as the nearest faces here; colors or fonts given beside url win. Ops use "var(--brand)" wherever a color goes and "var(--heading)" as a text font; changing the kit then changes every object that uses it, so one kit edit rethemes the canvas. Fonts are this canvas's faces (sans, ui, code, serif, mono, hand, marker, display, poster, heavy, hangul, dots, slam, grotesk, or an uploaded font's id); a family name is matched to the nearest of them.

  • {reference: {src: an https URL or a data: URL, x?, y?, w?, h?, fit?: "contain"|"cover"|"fill", opacity?}}: a picture under everything to paint against (a screenshot of a page to match, say), the whole canvas unless x, y, w, h say otherwise; or {reference: {img: an id}}: a picture this canvas or another of your canvases keeps (copied here), so a frame uploaded once serves every canvas. Locked; downloads and exports leave it out. {reference: null} takes it away. The reply lists its main colors to take as the kit. In a piece of shots, {reference: {src}, shot: "s3"} gives one shot its own (a frame of the video it matches; {reference: null, shot: "s3"} takes it away): canvas_look then shows and compares the shot's own while it shows, else the canvas's.

  • {frames: {page: {size: "desktop"}, phone: {size: "phone"}, og: {size: "og", x: -1400, y: 0}, icon: {x, y, w, h}}}: artboards (named frames), the sized parts of the design, each exported on its own at its own size (canvas_export frame) and seen alone with canvas_look frame. They sit anywhere on the open surface (-20000..20000 each way), side by side; drawing outside every artboard is kept (notes, spare parts) and is in no file. size is og 1200×630, icon 512×512, hero 1440×640, square 1080×1080, banner 1500×500; a web width, desktop (1440), tablet (768), phone (390), whose height grows with what is drawn in it (or h sets one); or, with Studio Plus, an exact "WxH". The file is that many pixels and the artboard that many units, unless w or h is given; a new one goes to the right of the others unless x, y are given. Or x, y, w, h in units. Give an artboard that exists only what changes ({og: {x: 40}}); null removes one; replace: true starts afresh. Up to 40. Artboards are never drawn in the picture.

  • {paper: {strength: 0.6, grain: 0.5}}: prints the canvas on paper: soft blotches and fibres under everything, a fine grain over everything (lines and type too). Neither moves with cameras or motion. A number is the strength; null takes it away.

  • {print: {strength: 0.6, register: 1.5, dropout: 0.6, stain: 0.3, seed}}: a cheap risograph or screen print look: ragged ink edges, each ink (kit name or color; a lined shape's fill and line apart) off register by up to register px, ink dropping out in specks and streaks, soft stains. Static: it moves only with a shot's camera. A shot's own (canvas_shot print) wins; false there for none. A number is the strength; null takes it away. overprint 0..1 (default 0, inks cover): where inks in a layer cross they multiply as real riso inks do (navy over orange comes out dark brown, pink dots over a cream shape a duller rose), so you need not pick a color for every crossing; each ink alone and the paper keep their colors. It is per layer: a layer over another covers it (put highlights and anything that must cover on a layer above); an op's own blend wins over it. 1 is the riso look; between 0 and 1 draws each ink twice (slower). canvas_undo takes back a whole call of edits. canvas_list shows names, keys and layers.

  • {comment: 3, reply: "what you changed", done: true}: answers feedback (as canvas_feedback does). frame {size: wide|square|portrait|tall|panorama or "WxH", background}: the canvas's own shape and background color (not a named frame), only while nothing is drawn on it (a canvas someone started for you): edits may then be left out.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "canvas_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
lookNothe after preview as canvas_look would show it: {frame (an artboard), view {x, y, w, h}, focus [names], time, strip, span, shot} (alone, it asks for preview after). With no frame, view or focus, a call that painted inside one artboard previews that artboard. With mode validate: a dry run, nothing saved or shown to people
modeNoforgiving applies usable items (default), validate saves nothing, atomic applies all or none
nextNowhat your next call will paint ("the animals, zone by zone"): shown to people watching while they wait
noteNo
editsNochanges, made in order
frameNosize and background, before anything is drawn
canvasNo
previewNoAttach a PNG after, or before and after
request_idNoyour own id for this call (a UUID): sent again after a timeout or a dropped connection, the call is not made twice; the reply says it was made the first time
working_onNowhat you are about to change: object names, kit fields ("kit.colors.accent") or frames; people watching see them marked as being worked on, and canvas_open tells a second assistant, for a minute or until your next call. A soft claim, not a lock
model_labelNoOptional public model name for the painting cursor, labeled as reported. Use only if your client knows it.
preview_widthNoPixels across for the preview (default 480; alone, it asks for preview after)
expected_revisionNoApply only at this drawing revision

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior1/5

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

The description explicitly includes destructive operations such as 'delete: true', null removals, erase, and replace, and external network reads such as reading a web page and https reference URLs. The annotations declare destructiveHint=false and openWorldHint=false, which directly contradicts the described behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and the long edit catalog is organized as bullets, but the description is an extremely dense wall of detail with many caveats packed into single lines. Much of it is necessary for the operation language, yet locating the relevant operation is difficult.

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 very complex mutation tool with no output schema, it explains most operation families, constraints, previews, undo behavior, and related sibling tools. It is still silent on the general response shape and some top-level call semantics, but the schema covers those parameters reasonably well.

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?

The schema covers 85% of the 13 top-level parameters, and the description adds substantial meaning for the otherwise untyped edits array by enumerating set/move/points/order/layer/kit/reference/frame operations and their syntax. It adds less for top-level controls like mode, request_id, or expected_revision, but those are already documented in the schema.

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 sentence states a specific verb and scope: it changes things already on the open canvas 'without repainting' rather than drawing new content, and notes collaborative visibility. That clearly distinguishes it from canvas_draw and makes the resource explicit.

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 gives many in-context pointers: canvas_get for numbered points and child IDs, canvas_list for names/keys/layers, and canvas_undo to revert a whole call. It also gives some exclusions such as leaving hide/lock state alone unless asked, but it does not explicitly spell out the switch from canvas_draw beyond implying it with 'without repainting'.

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.