update_doc
Change a draft or ready Doc, as the editor saves it: the title and/or the whole content (as `markdown`, or the TipTap JSON `content` from get_doc format json), at the `revision` you last read (get_doc).
destructiveSends, cancels or emails people. Clients ask you before running it.
What it does
Change a draft or ready Doc, as the editor saves it: the title and/or the whole content (as markdown, or the TipTap JSON content from get_doc format json), at the revision you last read (get_doc). If anyone saved since, nothing is saved: 409 revision_conflict with the current revision; read it again and redo the change. While someone else has the doc open in the editor it is 423 locked. Markdown replaces the whole content and gives boxes new ids (their fixed values and owners set in the app are lost): for a small change to a doc with set-up boxes, edit the JSON instead. Also, for the creator or an owner/admin: status (draft or ready; sending marks it sent), visibility (private, workspace_view, workspace_edit) and page_size (a4, letter); these need no revision. A sent Doc can't change (409 read_only): duplicate_doc it. Returns the new revision. Markdown here is AppliFlo's doc format: # / ## / ### headings, paragraphs, - and 1. lists, > quotes, --- dividers, **bold** and *italic*, plus tokens: {{client.full_name}} (a variable filled from the CRM at send), [[box role=client kind=text label="Passport number"]] (a box a person fills; kind text, date, number, email, phone, checkbox, dropdown with options="A|B", initials), [[signature role=client]] (a signature block) and [[pagebreak]]. role is a role's name (as get_doc lists them) or key. Masked values (•••123) can't be sent back: ask the person for the full number.
Inputs
| Name | Type | Description |
|---|---|---|
doc_idrequired | string | A Doc's doc_id (from list_docs, or list_documents' kind 'doc' rows).Up to 80 characters |
revision | integer | The revision get_doc returned. Needed with title, markdown or content.At least 0 |
title | string | Up to 200 characters |
markdown | string | The new content as Markdown (replaces it all).Up to 400000 characters |
content | object | The new content as TipTap JSON (replaces it all). |
status | string | One of: draft, ready |
visibility | string | private (default), workspace_view or workspace_edit.One of: private, workspace_view, workspace_edit |
page_size | string | One of: a4, letter |
Call it
Your MCP client builds this request for you. This is what it sends to https://appliflo.com/api/mcp, with the required inputs filled with placeholders.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "update_doc",
"arguments": {
"doc_id": "<doc_id>"
}
}
}Input schema
The JSON Schema the server lists for this tool in tools/list.
{
"type": "object",
"properties": {
"doc_id": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"description": "A Doc's doc_id (from list_docs, or list_documents' kind 'doc' rows)."
},
"revision": {
"type": "integer",
"minimum": 0,
"description": "The revision get_doc returned. Needed with title, markdown or content."
},
"title": {
"type": "string",
"maxLength": 200
},
"markdown": {
"type": "string",
"maxLength": 400000,
"description": "The new content as Markdown (replaces it all)."
},
"content": {
"type": "object",
"description": "The new content as TipTap JSON (replaces it all)."
},
"status": {
"type": "string",
"enum": [
"draft",
"ready"
]
},
"visibility": {
"type": "string",
"enum": [
"private",
"workspace_view",
"workspace_edit"
],
"description": "private (default), workspace_view or workspace_edit."
},
"page_size": {
"type": "string",
"enum": [
"a4",
"letter"
]
}
},
"required": [
"doc_id"
],
"additionalProperties": false
}create_doc
Start a new Doc (a contract or letter written in AppliFlo), private to the caller, as a draft.
list_doc_versions
A Doc's saved versions, newest first, without content: number, reason (manual: someone saved a version; auto: kept after 30 minutes of editing; send: what went out for signing; restore), note, title, created_at and created_by_name.