SpecifyDocs

canvas_build

tools/call

A shortcut for a whole diagram: from Mermaid text (flowchart, sequence or class diagram), or from nodes ({ key, shape, text, link, color }) and edges ({ from, to, label, style }) by key. It is laid out (top to bottom by default) and drawn in a new frame right of everything on the board, or in place of the contents of replaceFrame. Shapes: process, decision, terminal, document, data, database, sticky, text. At most 500 nodes and 1000 edges, with durable bounded saves and explicit progress. replaceFrame needs capacity for the new elements while retaining the old drawing during preparation.

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
mermaidstring
Mermaid text. Give either mermaid or nodes.
nodesobject[]
edgesobject[]
framestring
Name of the new frame (default Diagram).
replaceFramestring
A frame's id: its contents are deleted and the diagram drawn in their place.
direction"TB" | "LR" | "BT" | "RL"
layout"layered" | "tree" | "grid"
baseSeqinteger
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.