canvas_apply
tools/call
Change a canvas in one call: add nodes (beside a node with near and side, or at x and y), connect two nodes with a labelled connector that stays attached, update text, shape, color, link or an edge's label and style, move, and delete. Ids may name a node added earlier in the same call by its key. Send baseSeq (the seq you last read): an update to something a person changed after it is refused with CANVAS_CONFLICT and the current version. At most 500 input operations; expansion uses bounded pages. Free permits 200 distinct changed element IDs per logical call, including labels and endpoints.
Scopes
read:projectswrite:projects
A project canvas also needs its project to be readable, and for writes writable (Edit tasks, not archived) by the key's person. A workspace canvas is readable when its person owns it or it is shared with the workspace, and writable when its person owns it or holds Edit tasks on a shared one.
Inputs
- canvasIdstringRequired
- opsobject[]Required
- baseSeqinteger
- The seq you last read; changes others made after it are never overwritten.
- idempotencyKeystringRequired
- Unique retry key; a retry with the same key returns the first result and writes nothing.
- jobAction"status" | "cancel"
- Repeat the original tool and full input with the same idempotencyKey, adding status to recover progress or cancel to stop running work. Recovery adds no logical admission or usage. Incomplete preparation stays fenced to its action owner and expires if abandoned. Cancellation retains earlier writes for human Revert.
Returns
Frozen caller-key mapping and truthful durable preparation/job progress. jobId is null until job creation; preparing is not execution or completion. Repeat original input with its idempotencyKey to continue without another logical charge; jobAction status only reads. Cancellation while preparing remains original-owner fenced; running-job cancellation retains earlier writes for Revert. A call returns content[0].text with the JSON result and structuredContent.result with the same value.
Listed when
The key has read:projects and Canvas is open for the workspace; the tools that write need write:projects too.