Skip to Content

add_field

Draw a new box on a document page, as a person does with the app's box editor: use it for a box detection missed (e.g. a signature line or a date with no field). type: text, date (typed date), checkbox, signature, or date_signed (stamped with the signing date of the nearest signature on the page). page is 0-based and bbox is [x0, y0, x1, y1] in PDF points, the same coordinates list_fields shows for the boxes around it; the box is kept at least 6 pt each way and inside the page.

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

What it does

Draw a new box on a document page, as a person does with the app's box editor: use it for a box detection missed (e.g. a signature line or a date with no field). type: text, date (typed date), checkbox, signature, or date_signed (stamped with the signing date of the nearest signature on the page). page is 0-based and bbox is [x0, y0, x1, y1] in PDF points, the same coordinates list_fields shows for the boxes around it; the box is kept at least 6 pt each way and inside the page. A signature or date_signed box is filled by the signer. Returns the new field as list_fields shows it (use its id with fill_document, send_envelope or correct_field). Recorded in the document's correction log, as the app's edits are. To fix an existing box, use correct_field; to remove one, delete_field.

Inputs

NameTypeDescription
document_idrequiredstringThe document's id.
pagerequiredinteger0-based page number.0 to 2000
bboxrequirednumber[][x0, y0, x1, y1] in PDF points, as list_fields' bbox.4 to 4 items
typerequiredstringOne of: text, date, checkbox, signature, date_signed
labelrequiredstringWhat the box asks for, e.g. "Applicant signature".Up to 300 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": "add_field",
    "arguments": {
      "document_id": "<document_id>",
      "page": 1,
      "bbox": [],
      "type": "text",
      "label": "<label>"
    }
  }
}

Input schema

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

{
  "type": "object",
  "properties": {
    "document_id": {
      "type": "string",
      "description": "The document's id."
    },
    "page": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2000,
      "description": "0-based page number."
    },
    "bbox": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "minItems": 4,
      "maxItems": 4,
      "description": "[x0, y0, x1, y1] in PDF points, as list_fields' bbox."
    },
    "type": {
      "type": "string",
      "enum": [
        "text",
        "date",
        "checkbox",
        "signature",
        "date_signed"
      ]
    },
    "label": {
      "type": "string",
      "minLength": 1,
      "maxLength": 300,
      "description": "What the box asks for, e.g. \"Applicant signature\"."
    }
  },
  "required": [
    "document_id",
    "page",
    "bbox",
    "type",
    "label"
  ]
}

On this page