Skip to main content
Glama

Edit existing canvas content

canvas_edit
Destructive

Apply text, styles, rename, duplicate or move edits together in one atomic mutation. Use ids from the input version and the latest successful read or write version; no intermediate read is required just to advance a version. Keep the complete selection URL. Read only the missing subtree when ids are unknown. Returns a compact committed receipt; render after the requested changes are complete.

Input Schema

NameRequiredDescriptionDefault
editsYesSequential text, style, rename, duplicate or move edits, committed atomically. Target existing node IDs.
canvasYesCanvas UUID or full canvas/selection URL; selection limits the entire edit batch.
baseVersionYesExact version to edit, including the version returned by a previous successful write.
clientTokenNoReuse only when retrying this exact mutation.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / edits / description
      Previous value: -"One to 100 sequential text, style, rename, duplicate or move edits, committed atomically. Target existing node IDs."New value: +"Sequential text, style, rename, duplicate or move edits, committed atomically. Target existing node IDs."
    • changedInput schema / properties / edits / items / oneOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "kind": {
      -        "const": "set_text",
      -        "type": "string"
      -      },
      -      "nodeId": {
      -        "maxLength": 200,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "text": {
      -        "maxLength": 100000,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "nodeId",
      -      "text"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "kind": {
      -        "const": "set_styles",
      -        "type": "string"
      -      },
      -      "nodeIds": {
      -        "items": {
      -          "maxLength": 200,
      -          "minLength": 1,
      -          "type": "string"
      -        },
      -        "maxItems": 1000,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "styles": {
      -        "additionalProperties": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "number"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ]
      -        },
      -        "propertyNames": {
      -          "type": "string"
      -        },
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "nodeIds",
      -      "styles"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "kind": {
      -        "const": "rename",
      -        "type": "string"
      -      },
      -      "name": {
      -        "maxLength": 500,
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "nodeId": {
      -        "maxLength": 200,
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "nodeId",
      -      "name"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "kind": {
      -        "const": "duplicate",
      -        "type": "string"
      -      },
      -      "nodeIds": {
      -        "items": {
      -          "maxLength": 200,
      -          "minLength": 1,
      -          "type": "string"
      -        },
      -        "maxItems": 1000,
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "parentId": {
      -        "maxLength": 200,
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "nodeIds"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "destination": {
      -        "oneOf": [
      -          {
      -            "properties": {
      -              "kind": {
      -                "const": "before",
      -                "type": "string"
      -              },
      -              "nodeId": {
      -                "maxLength": 200,
      -                "minLength": 1,
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "kind",
      -              "nodeId"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "kind": {
      -                "const": "after",
      -                "type": "string"
      -              },
      -              "nodeId": {
      -                "maxLength": 200,
      -                "minLength": 1,
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "kind",
      -              "nodeId"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "index": {
      -                "maximum": 9007199254740991,
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "kind": {
      -                "const": "parent",
      -                "type": "string"
      -              },
      -              "parentId": {
      -                "maxLength": 200,
      -                "minLength": 1,
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "kind",
      -              "parentId"
      -            ],
      -            "type": "object"
      -          }
      -        ]
      -      },
      -      "kind": {
      -        "const": "move",
      -        "type": "string"
      -      },
      -      "nodeId": {
      -        "maxLength": 200,
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "nodeId",
      -      "destination"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "kind": {
      +        "const": "set_text",
      +        "type": "string"
      +      },
      +      "nodeId": {
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "text": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "nodeId",
      +      "text"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "kind": {
      +        "const": "set_styles",
      +        "type": "string"
      +      },
      +      "nodeIds": {
      +        "items": {
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "styles": {
      +        "additionalProperties": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "propertyNames": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "nodeIds",
      +      "styles"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "kind": {
      +        "const": "rename",
      +        "type": "string"
      +      },
      +      "name": {
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "nodeId": {
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "nodeId",
      +      "name"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "kind": {
      +        "const": "duplicate",
      +        "type": "string"
      +      },
      +      "nodeIds": {
      +        "items": {
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "parentId": {
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "nodeIds"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "destination": {
      +        "oneOf": [
      +          {
      +            "properties": {
      +              "kind": {
      +                "const": "before",
      +                "type": "string"
      +              },
      +              "nodeId": {
      +                "minLength": 1,
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "kind",
      +              "nodeId"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "properties": {
      +              "kind": {
      +                "const": "after",
      +                "type": "string"
      +              },
      +              "nodeId": {
      +                "minLength": 1,
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "kind",
      +              "nodeId"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "properties": {
      +              "index": {
      +                "maximum": 9007199254740991,
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "kind": {
      +                "const": "parent",
      +                "type": "string"
      +              },
      +              "parentId": {
      +                "minLength": 1,
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "kind",
      +              "parentId"
      +            ],
      +            "type": "object"
      +          }
      +        ]
      +      },
      +      "kind": {
      +        "const": "move",
      +        "type": "string"
      +      },
      +      "nodeId": {
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "nodeId",
      +      "destination"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / edits / maxItems
      Removed value: -100
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructive/non-readOnly/non-idempotent, so the description only needs to add context, and it does: edits are applied atomically as one batch, selection URL scoping limits the entire batch, and the result is a compact committed receipt rather than a full payload. It stops short of saying what a version mismatch or failed batch does to the canvas.

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 core behavior is front-loaded in sentence one, and the remaining sentences each carry a distinct rule (version sourcing, URL scope, subtree read, receipt/render ordering). It is dense and slightly overpacked, but no sentence is filler.

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?

With an output schema present and full parameter documentation, the description need not explain return shape, and it wisely uses its space for the hard parts: atomic batching, version sourcing, selection scoping, and when a read is actually required. Only error/conflict behavior under a stale baseVersion is left unaddressed.

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%, but the description still adds meaning beyond it: baseVersion must come from the input version or the latest successful read/write version (explicitly including the version returned by a prior write), and a full selection URL narrows the whole edit batch. That is substantive operational semantics, not schema restatement.

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?

States a specific verb and resource ('Apply text, styles, rename, duplicate or move edits... in one atomic mutation') and enumerates the exact operation kinds, so an agent can tell it apart from canvas_write_html (full content write) and canvas_render (rendering) 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?

Gives real conditional guidance: use ids from the input version and latest successful read/write version, no intermediate read is needed merely to advance a version, read only the missing subtree when ids are unknown, render after changes complete. It does not, however, explicitly name the alternative tools (e.g. when to prefer canvas_write_html over this) or state what happens on version conflict.

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.

Resources