canvas · 28 tools · Mounted by default
Read a Canvas, build it up node by node, capture it as an image, and publish it.
Every call also carries an exit code and timing in _meta, and errors come back as results rather than transport failures. See Results.
cohesive_canvas_archive
Hints — destructive Move a canvas to the trash. Archives a canvas (soft delete), cascading to the chats and files that live on it. Everything is restorable withcohesive_canvas_restore — nothing is destroyed.
Returns — JSON, as text content and as structured content.
cohesive_canvas_capture
Hints — read-only, idempotent Capture a canvas as an image. Renders the canvas the way the app draws it and returns the image as webp. By default the whole canvas is fit into the frame. To see a region the way a user would, pass bounds (a rectangle in canvas coordinates, “x,y,width,height”) or node_ids; both take the coordinates and ids thatcohesive_canvas_view prints.
The image carries the canvas ground and grid by default. background solid drops the grid, and background transparent leaves the ground out entirely so the webp can be composited onto something else.
The render runs server-side in a headless browser and takes tens of seconds. At most one of: bounds, node_ids. The rendered webp is returned as an image block.
Returns — The rendered image inline as
image/webp, up to 3 MiB. Above that the result points you at cohesive_file_get and its signed download_url instead.
cohesive_canvas_create
Hints — writes (no read-only or destructive hint) Create an empty canvas in a workspace. Creates a canvas. The workspace is the canvas’s home; folder additionally files it into an existing left-rail folder there, by folder ID or by name (matched against the workspace’s canvas folders). Canvases are not files: they live in workspaces and folders, not under file paths. Rename withcohesive_canvas_rename, relocate with cohesive_canvas_move, trash with cohesive_canvas_archive. Put content on it with the cohesive_canvas_node_add_* tools and cohesive_canvas_edge_add.
Returns — JSON, as text content and as structured content.
cohesive_canvas_edge_add
Hints — writes (no read-only or destructive hint) Add an edge between two nodes. Connects two nodes. source and target are NODE ids fromcohesive_canvas_view — never a file or entity id; for placed files and media the node id differs from the file id, and an edge to a non-node id is skipped. label puts short text at the midpoint (“depends on”). Handles (top-source, right-source, bottom-source, left-source) pin which side the edge leaves and enters; omit them to auto-route, set them for feedback loops and multi-edge pairs.
Returns — JSON, as text content and as structured content.
cohesive_canvas_edge_delete
Hints — destructive Delete edges.
Returns — JSON, as text content and as structured content.
cohesive_canvas_edge_update
Hints — destructive, idempotent Update an edge’s label or style.
Returns — JSON, as text content and as structured content.
cohesive_canvas_edit
Hints — destructive Apply a batch canvas edit (the raw canvas-edit payload). Applies one canvas-edit call from raw JSON — the escape hatch for building a whole diagram, or several changes, in a single atomic round-trip. The payload is the canvas-edit action’s input, verbatim:{"nodes": [...], "delete_node_ids": [...], "edges": [...], "delete_edge_ids": [...]}
Each nodes[] entry is {entity | entity_id | id, position, width, height}; entity is one of canvas_text_note, canvas_text_label, canvas_shape, canvas_connector, or a generic remote record. payload is the canvas-edit object: {nodes, delete_node_ids, edges, delete_edge_ids}.
Returns — JSON, as text content and as structured content.
cohesive_canvas_get
Hints — read-only, idempotent Show one canvas. view_url is the public URL to show a person; dashboard_url opens the canvas in the app for a signed-in user.
Returns — JSON, as text content and as structured content.
cohesive_canvas_list
Hints — read-only, idempotent List the canvases you can access. Lists every canvas you can access, most recently modified first. With workspace, lists only that workspace’s canvases (unpaginated — limit does not apply).
Returns — JSON, as text content and as structured content.
cohesive_canvas_move
Hints — destructive, idempotent Move a canvas to another workspace or folder. Relocates a canvas in the left rail: workspace re-homes it to another workspace, folder files it into a folder (by ID or name, within its workspace), root moves it back to its workspace’s top level. Folder and workspace moves compose: with both, the canvas moves to the workspace first and is then filed into that workspace’s folder. This moves the canvas object only; files ON the canvas stay with it. File records move separately withcohesive_file_move. At most one of: folder, root.
Returns — JSON, as text content and as structured content.
cohesive_canvas_node_add_block
Hints — writes (no read-only or destructive hint) Create an HTML file and place it as a live block. Creates a text/html file record IN the canvas and places it as a live block — a canvas-native component that renders your HTML at exactly the box you give it. This is the one command that makes a block; uploading an HTML file and placing it with add-entity yields a plain file card instead. A block renders at exactly width x height (multiples of 16, minimum 128 per side), so author the HTML to fill that box.
Returns — JSON, as text content and as structured content.
cohesive_canvas_node_add_connector
Hints — writes (no read-only or destructive hint) Add a free-floating connector line between two points. Adds a connector: a line or arrow between two absolute canvas coordinates, attached to nothing. To connect two NODES so the link follows them, usecohesive_canvas_edge_add instead — connectors are for freehand arrows and diagram lines between positions.
Connectors take no position or size; their geometry is start and end. arrow_mode none|end|both presets the arrowheads; curve smooth, straight, or step (default, right-angle).
Returns — JSON, as text content and as structured content.
cohesive_canvas_node_add_document
Hints — writes (no read-only or destructive hint) Create an HTML or markdown file and place it as a page card. Creates a file record IN the canvas — text/html or markdown, decided by the destination name’s extension — and places it as a standard page card that opens in the detail view. For an HTML component that should render live in a fixed box, usecohesive_canvas_node_add_block instead.
Cards default to the portrait page (320x416); explicit width/height override it, which is how a deck-style HTML document goes landscape.
Returns — JSON, as text content and as structured content.
cohesive_canvas_node_add_entity
Hints — writes (no read-only or destructive hint) Place an entity card: a platform file or a record from another platform. Places an entity card. Two modes: entity_id<id> places an entity the platform already knows by its data id — this is how a file record is placed on a canvas as a card (pass the file record’s ID; for a file from another workspace, add it to this canvas first with cohesive_file_reference).
platform <name> id <remote-id> places a generic card for a record living on another platform (slack, notion, github,…). Pass the source platform’s stable id VERBATIM — it deduplicates repeat placements.
Returns — JSON, as text content and as structured content.
cohesive_canvas_node_add_label
Hints — writes (no read-only or destructive hint) Add a text label (a single line of free-standing text). Adds a text label: one line of text directly on the canvas — headings, captions, annotations. Font sizes are 16px, 20px (default), 32px, 48px; keep content to roughly 8 words at 16-20px, 5 at 32px, 3 at 48px. Omit width to auto-size. Omit color for the theme-adaptive default (this is usually right). Colors are the spectrum palette: orange, yellow, green, blue, violet, mulberry, brown, indigo, olive.
Returns — JSON, as text content and as structured content.
cohesive_canvas_node_add_note
Hints — writes (no read-only or destructive hint) Add a text note (a sticky with a title and markdown body). Adds a text note: a titled sticky holding markdown content. Notes default to 288x288; use 192 height for short notes and 384 for long ones. The title should be 2-6 words. Colors are the sticky palette: apricot, butter (default), meadow, sea, orchid, rose, clay, mist, oat.
Returns — JSON, as text content and as structured content.
cohesive_canvas_node_add_shape
Hints — writes (no read-only or destructive hint) Add a shape (rectangle, circle, diamond, triangle, pentagon, cylinder). Adds a shape, optionally with centered label text (content). Shapes default to 144x144; 192x96 works well for sequence-diagram boxes. fill takes the sticky palette (apricot, butter, meadow, sea, orchid, rose, clay, mist, oat); stroke takes the spectrum palette and defaults to the stroke paired with the fill. no_fill draws a stroke-only outline.
Returns — JSON, as text content and as structured content.
cohesive_canvas_node_delete
Hints — destructive Delete nodes from a canvas. Deletes nodes by node id. Deleting a file’s node removes the card from the canvas; whether the file itself survives follows the platform’s file rules (a reference’s deletion removes only the reference).
Returns — JSON, as text content and as structured content.
cohesive_canvas_node_get
Hints — read-only, idempotent Read nodes in full. Fetches the complete stored content of specific nodes — the full text of notes thatcohesive_canvas_view truncates, complete entity data, exact geometry.
If a node’s content shows it is a file record (entity base “file_record”), the node holds only file METADATA: the file’s content is a different id and a different command — read it with cohesive_file_read <file-id> (metadata with cohesive_file_get <file-id>). Passing a file id to this command fails with exactly that pointer.
Returns — JSON, as text content and as structured content.
cohesive_canvas_node_move
Hints — destructive, idempotent Move a node to a new position. Repositions one node by its node id (top-left corner, canvas coordinates, 16px lattice). Works for every node type, including files and generated media. Content is untouched.
Returns — JSON, as text content and as structured content.
cohesive_canvas_node_resize
Hints — destructive, idempotent Resize a node. Resizes one node by its node id (dimensions in canvas units, 16px lattice). position moves it in the same call.
Returns — JSON, as text content and as structured content.
cohesive_canvas_node_update
Hints — destructive, idempotent Update a node’s content or style. Updates a canvas-native node in place: pass only the flags to change; the rest of the node is untouched (the platform merges partially). The node’s current type decides which flags apply — title/content/color for notes and labels, fill/stroke/shape/content for shapes, start/end and stroke flags for connectors. Only canvas-native nodes (notes, labels, shapes, connectors) update this way. A file’s content is edited through the file itself, and an HTML block through “file” commands on its file id — the canvas card re-renders on its own.
Returns — JSON, as text content and as structured content.
cohesive_canvas_publish
Hints — idempotent Publish a canvas to a public URL. Publishes a canvas as a read-only public snapshot — anyone with the URL can view it, no Cohesive account needed. The URL is printed as “Public URL” (view_url in JSON) and is the one to give a person; dashboard_url opens the canvas in the app for a signed-in user. Revoke withcohesive_canvas_unpublish.
Publishing runs server-side and takes a while (it rebuilds the snapshot and the social card), so this waits for it to finish and reports the outcome. The snapshot is a point-in-time copy: later canvas edits are not published until you publish again. view_url is the public URL to show a person; dashboard_url opens the canvas in the app for a signed-in user.
Returns — JSON, as text content and as structured content.
cohesive_canvas_raw
Hints — read-only, idempotent Print a canvas’s full content document. Prints the canvas’s full content document as{nodes, edges}, each keyed by id. Node and edge shapes follow the canvas frontend’s document model and are not a stable contract.
Full documents can be very large — survey with cohesive_canvas_view first, then use node_ids here to fetch specific nodes in full.
Returns — JSON, as text content and as structured content.
cohesive_canvas_rename
Hints — destructive, idempotent Rename a canvas.
Returns — JSON, as text content and as structured content.
cohesive_canvas_restore
Hints — idempotent Restore an archived canvas.
Returns — JSON, as text content and as structured content.
cohesive_canvas_unpublish
Hints — destructive Revoke a canvas’s public URL. Takes a published canvas offline: the public URL stops serving, and a publish still in flight is cancelled. The canvas itself is untouched.
Returns — JSON, as text content and as structured content.
cohesive_canvas_view
Hints — read-only, idempotent Survey a canvas’s nodes and edges. Renders the canvas’s compact projection — identity, geometry, and semantic content with styling stripped and free text truncated — as node and edge tables. With output json, emits the same compact data as JSON. Usecohesive_canvas_raw node_ids to fetch specific nodes in full.
Returns — JSON, as text content and as structured content.