Skip to Content

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

NameTypeDescription
titlestringDefaults to "Untitled doc" (or the template's title).Up to 200 characters
markdownstringThe content as Markdown with AppliFlo's tokens.Up to 400000 characters
contentobjectThe content as TipTap JSON ({type: "doc", content: [...]}), as get_doc format json returns it.
contract_template_idstringOne of AppliFlo's contract templates (list_templates kind contract), converted into a Doc.Up to 80 characters
doc_template_idstringA doc template saved with save_doc_as_template: its current version.Up to 80 characters
rolesobject[]The people it is for, in signing order; kind signer (signs) or cc (gets a copy).1 to 10 items
labelrequiredstringUp to 60 characters
kindrequiredstringOne of: signer, cc
risk_acceptedbooleanThe 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
}

On this page