canvas_apply
tools/call
Draw on a canvas the way a person does, in one call. draw places a rectangle, ellipse, diamond, sticky note, text, arrow, line, pen stroke (freedraw), image or frame at the x and y you give, with any style the property panel shows for it: stroke and background color (a color name, a Look token or hex), fill style, stroke width and style, sloppiness, edges, opacity, angle, font, size and alignment, arrow type and heads. An arrow's start and end attach to elements, a frame holds the ids it contains, and an image takes a file id from Files, never a URL. update changes any of those on any element, with its text, size and points, and moves it in or out of a frame. move moves an element, a frame with what is in it, or a group. delete removes an element or a group; a frame goes alone and what was in it stays, as when a person deletes a frame. group, ungroup and order (front, back, forward, backward) work like the editor's buttons, and fill colors the closed area at a point, like the bucket. A fill that depends on geometry an earlier op in the same call derived from other elements, such as a shape placed by a group's move to x, must go in a separate call, after a fresh read. add and connect remain as flowchart shortcuts: a node beside another with near and side, and a labelled connector that stays attached. Ids may name an element drawn 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, 50 images and 5 fills, and 2,000 points in an arrow, line or pen stroke; 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 connection's person. An organization canvas is readable when its person owns it or it is shared with the organization, and writable when its person owns it or holds Edit tasks on a shared one. A write that draws an image, or moves, restyles or lays out one already on the board, also needs read:files (an OAuth agent's Read files line) and the file readable in Files; deleting an image reads no file. The elements read names an image's file only to a caller that can read it this way. A file Design holds (a capture or a revision preview) is never placed or changed this way, so the Files rule for Design files (read:design) does not apply.
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 connection has read:projects and Canvas is open for the organization; the tools that write need write:projects too.