Skip to main content
Documents are Avazal’s own pages, kept in a folder tree. Slack canvases are documents too: reading one brings it into your documents. source says which (avazal or slack). What a run saves with documents.save (a page, screenshots, a report or a file) is a document too, with an aart_… id and its run. Reading needs documents:read; creating, editing and publishing need documents:write.

Read documents

documents.list returns documents, folders and canvases, most recently updated first. Narrow it with source, parentId (a folder, or null for the top level), query, kind, run for what one run saved, and for canvases conversation. Add account, a Slack workspace, to also list canvases nobody has opened in Avazal yet. documents.get returns the markdown, the revisionId you need to edit it, and a version. Add context: true for the folders the document sits in and the Slack List tasks it is attached to, read with tasks.get. revisionId reads an earlier revision. An unopened canvas is chcv_…/<file id>; once Avazal has it, its id is a doc_… id. Both work wherever an operation takes a document. A Slack canvas link works too: search.resolve returns its id. Over MCP, documents are also resources: resources/list returns them, and avazal://documents/{id} reads one.

Create

Set parentId to a folder’s id to create inside it, or null for the top level. Use kind: "folder" for a folder. Pass conversation instead to create a Slack canvas in a channel or DM; it is added as a tab there and posted to it, which is outward.

Edit

documents.update replaces the content. Pass the revisionId you read as expectedRevisionId:
If someone changed the document since you read it, the update fails with DocumentConflict, so you never overwrite their edit. Read it again, apply your change to the new content and retry. The same operation renames and moves: pass name and parentId (the current value of whichever you keep) with expectedVersion, the version from documents.get or documents.list. documents.delete removes a document or folder for everyone in Avazal, also with expectedVersion. Slack is unchanged.

History and restore

documents.revisions lists every saved revision, newest first, with who made it. origin is native for a save in Avazal, draft for an unpublished canvas edit and remote for a change made in Slack. Read one with documents.get and its revisionId. documents.update with restore brings back an earlier revision. Pass the current revisionId as expectedRevisionId, and draft.generation as expectedGeneration (0 when draft is null). On a canvas, the old text becomes your draft and nothing reaches Slack until you publish.

Edit and publish a Slack canvas

A canvas is edited as a draft in Avazal, then published to Slack, so a half-finished edit never reaches the channel. documents.get on a canvas returns a publish block: unpublished says whether your draft differs from Slack, generation is the draft’s version, canWrite says whether you may edit it, and operation is the latest publish.
  1. Read the canvas with documents.get. Note revisionId and draft.generation, or 0 when there is no draft.
  2. Call documents.update with the new markdown, expectedRevisionId and expectedGeneration. This saves your draft. Slack is unchanged.
  3. Call documents.publish. It is outward: everyone with access to the canvas sees the result.
bodyWrite is replace-document to replace the body, or append-only to only add to the end. Reuse the same idempotencyKey when you retry. The result is the document with its publish block; publish.operation.state is queued or applying while Slack applies it. Call documents.get with the operation’s id as operationId until the state is verified, conflict or failed. Add refresh: true to read the canvas as Slack now has it. If the canvas changed in Slack after your draft began, saving the draft fails with DocumentConflict. Read the canvas again, merge your change into its latest text, and call documents.update with resolve: true, the merged markdown and the fresh revisionId.

Canvas comments

comments.list with a canvas as target returns its comment threads, each with its anchor text and replies. Add thread to read one thread’s comments. comments.create starts a thread on a passage when you pass anchor, text copied from the canvas markdown, and answers in a thread when you pass thread. Both write with text or content, post as you, and are outward.
Comments use the documents:read and documents:write scopes here, and tasks:read and tasks:write on tasks. A canvas, a Slack List task or a document a run saved can have a public link that anyone can open on the Avazal web app without signing in. shares.get reads it and shares.update turns it on with shared: true, or off with shared: false. Turning it on again after turning it off makes a new link. Each takes a target:
  • A canvas: its doc_… id, or chcv_…/<file id>.
  • A Slack List task: its task id from tasks.list.
  • A document a run saved: the aart_… id returned by documents.save.
The result’s url is the link anyone can open while shared is true. Turning a link on or off is outward. Shares need the read or write scope of the target’s concept: documents, tasks, or automations for a document a run saved.

In MCP

Each operation on this page is an action of one MCP tool. The tool catalogue lists every tool with its fields.