create_doc
Start a new Doc (a contract or letter written in AppliFlo), private to the caller, as a draft.
asks firstChanges something in your workspace, so clients ask you before running it.
What it does
Start a new Doc (a contract or letter written in AppliFlo), private to the caller, as a draft. Start it blank, from markdown or the editor's TipTap JSON content, from one of AppliFlo's contract templates (contract_template_id) or from a doc template the workspace saved (doc_template_id, as the app's Use). roles names the people it is for ({label, kind: signer|cc}, in signing order; default Client and Agent, both signing); Markdown tokens name them. Returns the doc with doc_id and revision 0, and markdown_issues listing any token that couldn't be read (left in the text as typed). Docs are a person's tool: an API key can't create one. An AppliFlo library contract no lawyer has reviewed is refused (409 contract_risk_required) until the person accepts the own-risk terms: ask them, then call again with risk_accepted: true. (Here: a contract template.) 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 |
|---|---|---|
title | string | Defaults to "Untitled doc" (or the template's title).Up to 200 characters |
markdown | string | The content as Markdown with AppliFlo's tokens.Up to 400000 characters |
content | object | The content as TipTap JSON ({type: "doc", content: [...]}), as get_doc format json returns it. |
contract_template_id | string | One of AppliFlo's contract templates (list_templates kind contract), converted into a Doc.Up to 80 characters |
doc_template_id | string | A doc template saved with save_doc_as_template: its current version.Up to 80 characters |
roles | object[] | The people it is for, in signing order; kind signer (signs) or cc (gets a copy).1 to 10 items |
labelrequired | string | Up to 60 characters |
kindrequired | string | One of: signer, cc |
risk_accepted | boolean | The person accepts AppliFlo's own-risk terms (Terms section 8A) for a library contract no lawyer has reviewed. Set it only after asking the person. |
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": "create_doc",
"arguments": {}
}
}Input schema
The JSON Schema the server lists for this tool in tools/list.
{
"type": "object",
"properties": {
"title": {
"type": "string",
"maxLength": 200,
"description": "Defaults to \"Untitled doc\" (or the template's title)."
},
"markdown": {
"type": "string",
"maxLength": 400000,
"description": "The content as Markdown with AppliFlo's tokens."
},
"content": {
"type": "object",
"description": "The content as TipTap JSON ({type: \"doc\", content: [...]}), as get_doc format json returns it."
},
"contract_template_id": {
"type": "string",
"maxLength": 80,
"description": "One of AppliFlo's contract templates (list_templates kind contract), converted into a Doc."
},
"doc_template_id": {
"type": "string",
"maxLength": 80,
"description": "A doc template saved with save_doc_as_template: its current version."
},
"roles": {
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"maxLength": 60
},
"kind": {
"type": "string",
"enum": [
"signer",
"cc"
]
}
},
"required": [
"label",
"kind"
],
"additionalProperties": false
},
"description": "The people it is for, in signing order; kind signer (signs) or cc (gets a copy)."
},
"risk_accepted": {
"type": "boolean",
"description": "The person accepts AppliFlo's own-risk terms (Terms section 8A) for a library contract no lawyer has reviewed. Set it only after asking the person."
}
},
"additionalProperties": false
}get_doc
One Doc in full: title, status, revision (pass it to update_doc and send_doc), visibility, page_size, roles (the people it is for, in signing order; their keys are send_doc's people keys), signing_order, can_edit, can_share, editing_by, where it came from (contract_template_id, ai_drafted), and for a sent Doc envelope_id and pdf_document_id.
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).