MCP tools
Every tool the fenfill MCP server offers, with its inputs, outputs and an example. Generated from the server's own tool definitions (version 0.2.6).
All tools
| Tool | What it does | Read-only |
|---|---|---|
| analyze_form | Analyze a blank PDF form | no |
| fill_form | Fill an analyzed PDF locally | no |
| fill_template | Fill a saved template locally | no |
| make_fillable | Make a fillable PDF from a saved template | no |
| list_templates | List saved templates | yes |
| get_template | Get a template's fields | yes |
| create_recipient_link | Create a recipient link | no |
| get_recipient_status | Recipient link status | yes |
| get_account | Account and limits | yes |
| preview_page | Preview a page with its field boxes | yes |
| edit_template | Correct a form's fields locally | no |
| save_template | Save local edits to a template | no |
| reanalyze_template | Re-analyze pages of a saved template | no |
analyze_form uploads the blank PDF once; the result is cached on your machine. fill_form and fill_template stamp the answers into a new, flattened PDF on your machine. Ids in values may be shortened to an unambiguous prefix of 4 or more characters, as in the examples below.
analyze_form
Analyze a blank PDF form. Analyze a blank PDF form with fenfill and list its fillable fields (ids, types, labels). Uploads only the blank form. Costs one page scan per analyzed page unless cached or the PDF has native form fields (no page scans; detect_extra_blanks adds a paid scan of the chosen pages for blanks without a native field); pass estimate: true first to see the cost without uploading. Results are cached locally, so repeat calls and narrowing with pages use no page scans. If it returns status "running", call it again with the same arguments. To correct the layout and keep the corrections, analyze with save_as_template: true (edits on an unsaved analysis can be used for filling/preview but can't be saved). A rate-limit or busy refusal is waited out automatically (up to about a minute) before it is reported.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
path | string | yes | Absolute path (or ~/…) to the blank PDF. |
pages | string | no | 1-based pages to analyze, e.g. "1-3,5". Omit for all. Long PDFs: analyze in chunks; fill_form merges them. |
save_as_template | boolean | no | Also save it as a fenfill template (for fill_template and recipient links). |
access | "public" | "restricted" | no | With save_as_template: "public" (default; anyone with the template link can fill it) or "restricted" (members and recipient links only). create_recipient_link needs "restricted". |
force | boolean | no | Re-analyze even if cached (costs scans again). |
confirm_blank | boolean | no | Only after a prefilled_form refusal about annotations or XFA values, and only when the user confirms they are part of the blank form, not answers. Never for filled form fields. |
estimate | boolean | no | Only estimate, uploading nothing: counts pages and detects native form fields on this machine, then returns {page_count, likely_mode, estimated_scans, scans_remaining}. |
detect_extra_blanks | boolean | no | PDFs with native form fields: also find blanks that have no native field (e.g. a signature or date line), with a vision pass over the chosen pages: 1 page scan per page (pass pages to limit it). Ignored (no extra cost) when the form is analyzed by AI anyway. An analysis that used no page scans reports extra_blanks_available: true when this is likely worth it. |
Returns
The form's fields with their ids, types and labels, by section (with each section_id). status: "running" means the result isn't ready yet: call again with the same arguments. With estimate: true: page_count, likely_mode, estimated_scans and scans_remaining, and nothing is uploaded.
Example
{ "path": "~/Documents/blank-application.pdf", "pages": "1-3"}fill_form
Fill an analyzed PDF locally. Fill a PDF you analyzed with analyze_form and write a new, flattened PDF. Runs entirely on this machine and the values never leave it; the only network use is a one-time download of the public Japanese font from fenfill.com, the first time a value needs it (it carries no form data). values maps field ids to: text/multiline = string, stamped exactly as given (a date in a text field goes in the format its label or placeholder asks, e.g. "mmddyyyy" → "10042026"); date = "YYYY-MM-DD", printed in the field's date_format (shown on the field, e.g. DD/MM/YYYY); comb = string, one character per cell; checkbox = boolean; radio = option id or label, or the bare option text ("No" for "Smoke? No"); multiselect = array of those; table = {cellId: value}; table_rows = [{columnId: value}, …]; signature = {"image_path": "/abs/sig.png"} (PNG or JPG). A signature with signing_requirement "external" is signed outside fenfill (on paper or by e-sign) and stays blank. Returns filled/skipped counts and warnings, including text shrunk hard or running past its box and filled boxes that overlap; pass check_pdf to see the result.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
path | string | yes | The same blank PDF you passed to analyze_form. |
values | object | yes | Field id → value (see description). Any id may be shortened to an unambiguous prefix of 4+ characters (the preview tags show 6), a table's cell or column id inside its value and an option id in a choice's value too. A table cell's id given at the top level goes into its table; an option's id given true selects it (a radio's value, or one more item of a multiselect). A date comb (a comb group with cell_type date) takes the whole date as one string: YYYY-MM-DD (laid out by its date_format), or its max_length digits in printed order; a single field drawn over cells takes one character per cell, as typed. A key that matches nothing, or starts several ids, is listed in skipped with candidates. |
output_path | string | yes | Absolute path (or ~/…) of the new .pdf to write. |
overwrite | boolean | no | Replace output_path if it exists. |
check_pdf | boolean | no | Also write <output>.check.pdf beside it: the filled PDF with every field box outlined (green filled, orange warning, red skipped, grey empty) and tagged with its id prefix. Open it to verify placement; it stays on this machine. |
Returns
Filled and skipped counts and warnings: keys that matched nothing (with candidates), text shrunk hard or running past its box, filled boxes that overlap, required fields left empty. The new PDF is written to output_path on your machine.
Example
{ "path": "~/Documents/blank-application.pdf", "values": { "3f9a2c": "Ada Lovelace", "b71e04": "1990-05-17", "c02d9e": true, "e45a10": "No" }, "output_path": "~/Documents/application-filled.pdf", "check_pdf": true}fill_template
Fill a saved template locally. Fill a saved fenfill template and write a flattened PDF. The blank PDF and field schema are downloaded; filling happens on this machine and the values are never sent anywhere. values maps field ids to: text/multiline = string, stamped exactly as given (a date in a text field goes in the format its label or placeholder asks, e.g. "mmddyyyy" → "10042026"); date = "YYYY-MM-DD", printed in the field's date_format (shown on the field, e.g. DD/MM/YYYY); comb = string, one character per cell; checkbox = boolean; radio = option id or label, or the bare option text ("No" for "Smoke? No"); multiselect = array of those; table = {cellId: value}; table_rows = [{columnId: value}, …]; signature = {"image_path": "/abs/sig.png"} (PNG or JPG). A signature with signing_requirement "external" is signed outside fenfill (on paper or by e-sign) and stays blank.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
template_id | string | yes | Template id (from list_templates). |
values | object | yes | Field id → value (see description). Any id may be shortened to an unambiguous prefix of 4+ characters (the preview tags show 6), a table's cell or column id inside its value and an option id in a choice's value too. A table cell's id given at the top level goes into its table; an option's id given true selects it (a radio's value, or one more item of a multiselect). A date comb (a comb group with cell_type date) takes the whole date as one string: YYYY-MM-DD (laid out by its date_format), or its max_length digits in printed order; a single field drawn over cells takes one character per cell, as typed. A key that matches nothing, or starts several ids, is listed in skipped with candidates. |
output_path | string | yes | Absolute path (or ~/…) of the new .pdf to write. |
overwrite | boolean | no | Replace output_path if it exists. |
check_pdf | boolean | no | Also write <output>.check.pdf beside it: the filled PDF with every field box outlined (green filled, orange warning, red skipped, grey empty) and tagged with its id prefix. Open it to verify placement; it stays on this machine. |
Returns
The same report as fill_form. The blank PDF and fields are downloaded; the values are stamped on your machine, with the workspace's branding as in the fenfill web app.
Example
{ "template_id": "6c1d2e8a-4b7f-4e21-9a3c-5d0e7f8b9a12", "values": { "3f9a2c": "Ada Lovelace", "9d40b1": [ { "1a2b": "Notebook", "5c6d": "2" } ] }, "output_path": "~/Documents/order-filled.pdf"}make_fillable
Make a fillable PDF from a saved template. Turn one of your saved fenfill templates into a blank fillable PDF: the original form with a real form field on every blank, so it can be filled in any PDF reader. The fields are empty; this tool takes no values and never sends any (only the template id goes to fenfill). Uses the template as saved in fenfill: unsaved local edits (edit_template) are not in it, so save_template first. Needs the Team plan or above; to fill the form yourself, use fill_template (any plan). If some fields couldn't be placed, the result has skipped_fields and a skipped_note saying how to fix them.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
template_id | string | yes | Template id (from list_templates). |
output_path | string | yes | Absolute path (or ~/…) of the new .pdf to write. |
overwrite | boolean | no | Replace output_path if it exists. |
Returns
output_path and bytes of the blank fillable PDF written there: the form with an empty form field on every blank, to fill in any PDF reader. Only the template id is sent. edited_note when you have unsaved local edits, which the PDF doesn't include.
Example
{ "template_id": "6c1d2e8a-4b7f-4e21-9a3c-5d0e7f8b9a12", "output_path": "~/Documents/order-fillable.pdf"}list_templates
List saved templates. List the workspace's saved fenfill templates, newest first. analyzed_pages lists the pages fenfill analyzed: a page missing from it (compare page_count) was never analyzed, so it has no fields yet (reanalyze_template fixes that).
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Page size (1–100, default 20). |
cursor | string | no | next_cursor from the previous call. |
Returns
The workspace's templates, newest first, each with page_count and analyzed_pages, and a next_cursor for the next page.
Example
{ "limit": 20}get_template
Get a template's fields. Get a saved template's fillable fields (ids, types, labels) for fill_template. Use pages to narrow a large form. With local edits (edit_template) it lists your working copy, as fill_template and preview_page use it (edited: true): new ids, deletions, sections and order show before you save; version: "saved" lists fenfill's saved version instead. unanalyzed_pages (when present) lists pages fenfill never analyzed: they have no fields yet; reanalyze_template with kind scratch analyzes them.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
template_id | string | yes | Template id (from list_templates). |
pages | string | no | 1-based pages, e.g. "1-3,5". Omit for all. |
version | "working" | "saved" | no | "working" (default): your local edits when there are any, else the saved template. "saved": fenfill's saved version, whatever you edited. |
Returns
The fields in sections, in fenfill's order, with field_count (entries listed) and field_count_total (the whole form). unanalyzed_pages when some pages were never analyzed; edited: true when it lists your local working copy.
Example
{ "template_id": "6c1d2e8a-4b7f-4e21-9a3c-5d0e7f8b9a12", "pages": "1"}create_recipient_link
Create a recipient link. Create a personal fill link for one recipient of a restricted template (analyze_form with save_as_template: true and access: "restricted" makes one; a public template answers template_not_restricted). Needs a plan with recipient links. Track it with get_recipient_status.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
template_id | string | yes | Template id (from list_templates). |
label | string | yes | Who it's for, e.g. a name (1–60 characters). |
expires_at | string | no | Optional ISO 8601 expiry, e.g. 2026-12-31T23:59:59Z. |
Returns
A personal fill link for that recipient. It is a working access link to the form: treat it as a secret and share it only with that recipient.
Example
{ "template_id": "6c1d2e8a-4b7f-4e21-9a3c-5d0e7f8b9a12", "label": "Applicant 1", "expires_at": "2026-12-31T23:59:59Z"}get_recipient_status
Recipient link status. List a template's recipient links and their status (pending, opened, completed).
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
template_id | string | yes | Template id (from list_templates). |
Returns
The template's recipient links, each with its status: pending, opened or completed.
Example
{ "template_id": "6c1d2e8a-4b7f-4e21-9a3c-5d0e7f8b9a12"}get_account
Account and limits. Show this API key's plan, page scans left and limits. To price an analysis, call analyze_form with estimate: true instead: it counts the pages and detects native fields locally, with no upload, and compares that with scans_remaining.
Inputs
None.
Returns
The plan, the page scans left and the limits for this API key.
Example
{}preview_page
Preview a page with its field boxes. Render one page as a PNG with every field box outlined (green filled, orange warning, red skipped, grey empty) and tagged with its id prefix, plus a legend: tag → id, type, label, box (page fractions, top-left origin), format and font_pt; options, table cells (row, col), table_rows columns and (in a crop) comb cells with their own boxes. placement_warnings ([] = checked, clean) covers every box shown: text much larger than its neighbours', a box over printed text (not on scans; a pale hint at its left edge is a placement_note), a box past its ruled cell, an option box on the wrong side of its caption. Read-only audit; values stamp test values. overlay: "outline" drops the tags, "none" shows only the stamped page (e.g. after check_copy_failed). crop + zoom magnify a region; legend: "changed" lists only what changed since your last preview of the page (moved_into: fields now in a table or group). Renders the edit_template working copy if any, else the saved or analyzed version (edited: true/false). Local: nothing is written to disk, values are never sent; the sole network use is a one-time download of fenfill.com's public Japanese font when a value first needs it (no form data).
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
path | string | no | The blank PDF you analyzed with analyze_form (absolute or ~/…). Pass this or template_id. |
template_id | string | no | A saved template's id. Pass this or path. |
page | integer | yes | 1-based page number. |
values | object | no | Optional, exactly as for fill_form (ids may be shortened the same way): values maps field ids to: text/multiline = string, stamped exactly as given (a date in a text field goes in the format its label or placeholder asks, e.g. "mmddyyyy" → "10042026"); date = "YYYY-MM-DD", printed in the field's date_format (shown on the field, e.g. DD/MM/YYYY); comb = string, one character per cell; checkbox = boolean; radio = option id or label, or the bare option text ("No" for "Smoke? No"); multiselect = array of those; table = {cellId: value}; table_rows = [{columnId: value}, …]; signature = {"image_path": "/abs/sig.png"} (PNG or JPG). A signature with signing_requirement "external" is signed outside fenfill (on paper or by e-sign) and stays blank. Test values count as answers for the wording check of edit_template and save_template: prefer ones that are not words printed on the form (a caption that repeats one has to be confirmed there). |
dpi | integer | no | Resolution (default 110, max 200). The image's longest side is capped at 2000 px; the result's dpi is what was rendered (use crop + zoom for more detail). |
crop | object | no | Optional: render only this region of the page (fractions, top-left origin, like the legend boxes), magnified by zoom. The legend then lists only what the region shows. Convert a position read off the image by proportion (x = crop.x + crop.w × pixel x / image width, the same for y), not by pixel count: a client may show the image smaller than width × height. |
zoom | number | no | With crop: magnification (default 2, max 8). |
legend | "all" | "changed" | "none" | no | Which legend rows to return: "all" (default), "changed" (only what changed since your last preview of this page, or, the first time, since fenfill's version; plus removed ids), or "none". |
overlay | "full" | "outline" | "none" | no | What is drawn over the page: "full" (default) = every box outlined and tagged, table headers printed; the tags keep off the printed text and the stamped values (a tag with no room beside its box is moved off and joined to it by a thin line); "outline" = the boxes only, no id tags and no table header texts; "none" = nothing, the page as a fill stamps it. Use "outline" or "none" when an outline covers what you must read, or on a scan (no text layer: there a tag may still cover print). The legend and placement_warnings are the same in all three. |
Returns
A PNG of the page plus a legend: each box's tag, id, type, label and box, with formats, options and table cells. warnings and placement_warnings are always present ([] = checked and clean). width, height and dpi describe the image; edited says whether it shows your local working copy.
Example
{ "path": "~/Documents/blank-application.pdf", "page": 1, "overlay": "full"}edit_template
Correct a form's fields locally. Correct a form's fields on this machine: move, resize, relabel, retype, add, delete or regroup fields of an analyzed PDF (path) or a saved template (template_id). Edits go to a local working copy that fill_form, fill_template and preview_page use at once; nothing is sent until save_template, and then only the layout and the form's wording. Labels, descriptions, placeholders and options hold the FORM's own wording (its captions and instructions), never the user's answers: answers go only in fill values. Ids are the ones analyze_form / get_template / preview_page show (an option or table cell id addresses that box); any id may be shortened to an unambiguous prefix of 6+ characters, like the preview tags. Coordinates are fractions of the page (0–1), top-left origin, x right, y down; preview_page's legend shows every box. Returns applied, rejected [{op_index, reason}], diff_summary (ops: snapped, noop per op) and warnings ([] = none; placement checks touched boxes: oversized text, over printed text, past the ruled cell). Edits to an unsaved analysis stay local: to keep corrections, analyze_form with save_as_template: true and edit that template.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
path | string | no | The blank PDF you analyzed with analyze_form (absolute or ~/…). Pass this or template_id. |
template_id | string | no | A saved template's id. Pass this or path. |
ops | array of object | no | Edit ops, applied in order (max 200), each all-or-nothing; a box only has to lie on the page after the whole batch (so move then resize is fine). Fields: set_box {id, x, y, w, h, snap?} (absolute top-left + size; a group scales its members); move {id, dx, dy} or {id, x, y, snap?} (new top-left); resize {id, w, h}; add {page, type: text|multiline|date|checkbox|signature, box: {x, y, w, h}, label, description?, placeholder?, required?, section_id?, snap?} (diff_summary.added gives the new id, diff_summary.ops the section it landed in: without section_id, that of the nearest field at or above it); snap: "underline" fits the box onto the printed rule under it, "cell" into the ruled box around it, "answer" into that cell's blank part below (or after) its printed caption (read from the page on this machine; a miss keeps your box and warns); relabel {id, label}; retype {id, type} (a radio/multiselect group: radio|multiselect); delete {id}; set_format {id, format: {...}} (font_size, text_anchor, variant, date_format: DD/MM/YYYY|MM/DD/YYYY|YYYY-MM-DD|DD.MM.YYYY|DD-MM-YYYY; null removes a key; on a table cell it applies to the cell's whole column/row; a comb group: cell_type char|integer|date, or date_format with one D/M/Y letter per cell, e.g. DDMMYYYY, which makes it a date comb; diff_summary.ops shows the comb's cell_type, date_format and max_length); set_required {id, required}; set_description {id, description}; set_placeholder {id, placeholder} (null clears); set_autofill {id, autofill: a browser token (name, given-name, family-name, email, tel, street-address, postal-code, bday, …) or null}. Groups: group {ids, kind: "choice"|"comb", label, multiple?} (standalone fields on one page; choice turns them into checkbox options; the members keep their ids, and diff_summary.ops lists them in reading order with the group's section; the group stands where its earliest member stood); ungroup {id}; set_options {id, options: [{id, label}] (recommended) or ["label", …]: plain labels go to the options in the order of the ids of a group op earlier in the same call, else in reading order (as get_template lists them); diff_summary.ops shows each option's label}; add_option {id: group, label, box, index?} and remove_option {id: group, option} keep the group's id. Combs in one op: add {type: "comb", page, label, cells: N (box cut into N equal cells) | [{x, y, w, h}, …] (each printed cell's box, for cells split by separators), box?, cell_type?, date_format?, section_id?} (its cells have no label); retype {id, type: "comb", cells, cell_type?, date_format?} turns a text/date field into a comb over its box, keeping label, section, order and required; comb_add_cell {id: comb, box, date_format?} and comb_remove_cell {id: cell, date_format?} (a date comb needs its new date_format, one letter per cell); group {kind: "comb"} takes cell_type and date_format too, and set_format on a comb's cell applies to its comb. Refs: any op that adds something takes ref: "name", and later ops of the same call write "$name" for its id (set_format {id: "$dob", …}). Tables: group {kind: "table", label, cells: [[id|null, …], …] (rows × columns) or ids (laid out from their boxes), header_cols?, header_rows?, orientation?: "col"|"row" (the axis whose lines carry the types; default col), format?: classic|expandable|checkbox_matrix}; table_insert {id, axis: "row"|"col", index, box?: {y, h} for a row / {x, w} for a column (default: one pitch past the edge, or centred in the gap), header?, type?}; table_delete {id, axis, index, keep_cells?}; table_add_cell {id, row, col, box?} (fills an empty slot); table_adopt {id, field, row, col} (moves a loose field into an empty slot); set_column_type {id, index, type: text|number|currency|date|checkbox, date_format?} (index along the typed axis); set_orientation {id, orientation} (resets every cell to text); set_header {id, axis, index, text}; set_headers {id, axis, texts: [...], start?} (several at once). Order: reorder {page, ids} moves those top-level entries together, in that order, to where whichever of them is listed first now stands (not ids[0]'s place); every other entry keeps its relative order (stamps order; geometry no longer decides). A partial list moves only what it names: to put B right after A, list both; chained partial reorders are simplest replaced by one with the page's whole list. diff_summary.ops shows the order now listed. A section is listed as one run where its first entry stands, so entries of different sections never stand together: set_section {ids, section_id | null} moves fields or groups of one page to another of its sections (get_template shows each section's section_id; null = no section), and set_section_title {page, section_id, title} renames one. A reorder whose ids cannot come out as asked and that would change nothing in the listing is rejected. Every cell of one column (or row, when orientation is row) has one type. |
discard | boolean | no | Drop the local working copy first (any ops then apply to fenfill's version). ops may be left out with it. |
confirm_wording | boolean | no | Only after an op was rejected because its wording matches an answer of this session: true confirms the rejected wording is the form's own printed text, not an answer, so the same op applies. It covers only wording a rejection has already named (that text in that property); new wording is rejected and named first. |
Returns
applied, rejected ([{op_index, reason}]), diff_summary (each applied op, with snapped and noop) and warnings from the placement checks.
Example
{ "path": "~/Documents/blank-application.pdf", "ops": [ { "op": "move", "id": "3f9a2c", "dx": 0.01, "dy": 0, "snap": "underline" }, { "op": "relabel", "id": "b71e04", "label": "Date of birth" } ]}save_template
Save local edits to a template. Save edit_template's local working copy of a saved template to fenfill (only the layout and the form's wording are sent; never fill values). Fails safely if the template changed in fenfill since the edits began (template_conflict: the local edits are kept; discard and re-apply them), and refuses wording that repeats an answer given to fill_form / fill_template / preview_page in this session (answers never go into a template): answer_in_template lists the matched ids and properties. An answer: fix it with edit_template. The form's own wording (a caption that shares a word with a test value): call again with confirm_wording: true. Wording edited in an earlier session can't be checked that way: save_template then answers confirm_wording_needed with the changed ids and properties; review that wording (preview_page shows labels) and call again with confirm_wording: true. An unsaved analysis can't be saved: analyze it again with save_as_template: true (no page scans on a native-field PDF; otherwise it costs scans again), then edit that template.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
template_id | string | yes | Template id (from list_templates). |
confirm_wording | boolean | no | Only after an answer_in_template or confirm_wording_needed error: true confirms you compared the listed wording with the printed form and it is the form's own text, not an answer. An entry no error has listed yet is refused and listed first, on a copy from an earlier session too. |
Returns
The saved template's field_count (the whole template). With nothing to save: saved: false, nothing_to_save: true. Refuses with template_conflict, answer_in_template or confirm_wording_needed instead of sending.
Example
{ "template_id": "6c1d2e8a-4b7f-4e21-9a3c-5d0e7f8b9a12"}reanalyze_template
Re-analyze pages of a saved template. Re-run fenfill's analysis on some pages of a SAVED template, using the blank PDF already stored with it (nothing is uploaded). Spot never-analyzed pages with get_template (unanalyzed_pages) or list_templates (analyzed_pages vs page_count). kind: "scratch" (default; only allowed when the pages have no fields) analyzes a never-analyzed page, or replaces a badly analyzed one's fields; "find" adds blanks the first pass missed and keeps everything else; "relabel" re-derives labels, types, groups and sections keeping the boxes (relabel may reset table column types/orientation; check get_template after); "label_missing" fills in only missing labels. Cost: 1 page scan per page; label_missing may use none (get_account shows what is left). Pass estimate: true first to price it (starts nothing). Unsaved local edits (edit_template) must be saved (save_template) or dropped (discard: true) first. Returns the pages' changes (added / removed / changed fields) and their new fields. If it returns status "running", call it again with the same arguments (no extra charge). A rate-limit or busy refusal is waited out automatically (up to about a minute).
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
template_id | string | yes | Template id (from list_templates). |
pages | string | yes | 1-based pages to re-analyze, e.g. "2" or "2-4". |
kind | "scratch" | "find" | "relabel" | "label_missing" | no | scratch | find | relabel | label_missing (see the description). Omit only for pages with no fields (= scratch). |
estimate | boolean | no | Only price it: returns {cost, scans_left, free_label_pages, insufficient, …} and starts nothing. |
discard | boolean | no | Drop this template's unsaved local edits (edit_template) when the re-analysis finishes, instead of refusing. |
Returns
Per changed page, the fields added, removed and changed, then the new fields of those pages. With estimate: true it prices the run and starts nothing. status: "running" means call again with the same arguments.
Example
{ "template_id": "6c1d2e8a-4b7f-4e21-9a3c-5d0e7f8b9a12", "pages": "2", "kind": "find", "estimate": true}