Skip to Content

upload_document

Upload a PDF or Word (.docx) file into the workspace as a persisted document, returning its document_id for use by detect_fields/fill_document/send_envelope.

asks firstChanges something in your workspace, so clients ask you before running it.

What it does

Upload a PDF or Word (.docx) file into the workspace as a persisted document, returning its document_id for use by detect_fields/fill_document/send_envelope. A DOCX is converted to PDF. Send the file in exactly one way: content_base64, file_url (a public https link AppliFlo downloads), or upload_id (from request_upload, once the person has uploaded the file on its page). The type is read from the file's bytes; at most 20 MB. There is no detection or filling until you call detect_fields next.

Inputs

NameTypeDescription
namestringDisplay name for the document, e.g. the original filename. Required with content_base64 or file_url; with upload_id the uploaded file's own name is used.Up to 255 characters
content_base64stringBase64-encoded PDF or DOCX bytes.
file_urlstringInstead of content_base64: a public https:// link to the file (e.g. a chat attachment's download URL). AppliFlo downloads it: no private or internal addresses, at most 3 redirects, 20 MB and 20 seconds. The type is read from the file itself, never the link.Up to 2048 characters
upload_idstringThe upload_id request_upload returned: picks up the document the person uploaded on the link's page.Up to 64 characters
idempotency_keystringSame key = same call: a retry (e.g. after a timeout) returns the first result instead of doing it again. The same key with other arguments is refused (422 idempotency_key_reused).Up to 255 characters

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": "upload_document",
    "arguments": {}
  }
}

Input schema

The JSON Schema the server lists for this tool in tools/list.

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "description": "Display name for the document, e.g. the original filename. Required with content_base64 or file_url; with upload_id the uploaded file's own name is used."
    },
    "content_base64": {
      "type": "string",
      "minLength": 1,
      "description": "Base64-encoded PDF or DOCX bytes."
    },
    "file_url": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048,
      "description": "Instead of content_base64: a public https:// link to the file (e.g. a chat attachment's download URL). AppliFlo downloads it: no private or internal addresses, at most 3 redirects, 20 MB and 20 seconds. The type is read from the file itself, never the link."
    },
    "upload_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "The upload_id request_upload returned: picks up the document the person uploaded on the link's page."
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "description": "Same key = same call: a retry (e.g. after a timeout) returns the first result instead of doing it again. The same key with other arguments is refused (422 idempotency_key_reused)."
    }
  }
}

On this page