Skip to Content

detect_fields

Run field detection on a previously uploaded document and persist the detected fields, exactly as the AppliFlo app does: the form's sections and skip rules are saved, block-letter forms are noted, and corrections the workspace made to this same form before come back (remembered = how many).

destructiveSends, cancels or emails people. Clients ask you before running it.

What it does

Run field detection on a previously uploaded document and persist the detected fields, exactly as the AppliFlo app does: the form's sections and skip rules are saved, block-letter forms are noted, and corrections the workspace made to this same form before come back (remembered = how many). Precondition: document_id must reference a document uploaded via upload_document. Returns the full field list, the choice questions (groups[]: one question answered by ticking boxes, e.g. Title = Mr/Mrs/Miss/Ms), plus flagged_count — fields with flagged:true are low-confidence detections (wrong type, bad box, or unclear label). Never fill a flagged field blindly: either call correct_field to fix it first, or surface it to a human for review before fill_document. match: true (for a first read of a scanned or flat PDF) first checks whether it is a government form AppliFlo already has; if so nothing is read (no AI pages used), fields is empty and official_match + notice say what to do. vision_skipped:true means an AI-reading limit was reached, so only the PDF's built-in fillable fields were read and the list may be incomplete; tell the user. vision_pages is how many pages AI read. ai_pages is the workspace's AI page allowance ({used, limit, remaining, exhausted, resets_at}); when ai_pages.exhausted is true, relay notice to the user.

Inputs

NameTypeDescription
document_idrequiredstringId returned by upload_document.
matchbooleantrue to check first whether a new flat upload is a government form AppliFlo already has (default false: always read the boxes). Only for a document with no boxes yet (409 otherwise).

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

Input schema

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

{
  "type": "object",
  "properties": {
    "document_id": {
      "type": "string",
      "description": "Id returned by upload_document."
    },
    "match": {
      "type": "boolean",
      "description": "true to check first whether a new flat upload is a government form AppliFlo already has (default false: always read the boxes). Only for a document with no boxes yet (409 otherwise)."
    }
  },
  "required": [
    "document_id"
  ]
}

On this page