Update a field
update_fieldModify an existing field's position, size, semantic name, type, or alignment in the active workspace.
Overwrite/merge behavior: performs a partial update (patch) on `field_id` in
`workspace_id`. Only the optional parameters explicitly provided with non-`None`
values (`x`, `y`, `w`, `h`, `name`, `field_type`, `align`, `vertical_align`)
overwrite the field's attributes; omitted or `None` parameters keep their
existing values unchanged. Editing an ML-detected field (`source="ml"`)
promotes it to `source="agent"` with `confidence=1.0`. Returns the updated
field dict, or `{"error": ...}` if `field_id` is not found in the workspace.
Persistence & review impact: changes persist immediately in the active
workspace (`workspace_id`), invalidate the page's visual review receipt when
geometry (`x`, `y`, `w`, `h`) changes, and do not affect saved account
templates unless `save_template` is called.
When to use:
- Use `update_field` when modifying a single existing field.
- Use `update_fields` for batch updates across 2 or more fields in one call
(e.g. assigning semantic `name`s before `save_template`).
- Use `add_field` to create a missing field, or `remove_field` to delete a
false-positive field.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| h | No | New box height as a percentage of page height (`> 0.0` and `<= 100.0 - y`). Omit or pass `None` to keep the existing `h`. | |
| w | No | New box width as a percentage of page width (`> 0.0` and `<= 100.0 - x`). Omit or pass `None` to keep the existing `w`. | |
| x | No | New left-edge horizontal coordinate as a percentage of page width (`0.0`–`100.0`, top-left origin). Omit or pass `None` to keep the existing `x`. | |
| y | No | New top-edge vertical coordinate as a percentage of page height (`0.0`–`100.0`, top-left origin). Omit or pass `None` to keep the existing `y`. | |
| name | No | New short semantic label for the field (e.g. `'company_name'`, `'total_score'`). Omit or pass `None` to keep the existing `name`. | |
| align | No | New horizontal text alignment: `'left'`, `'center'`, or `'right'`. Omit or pass `None` to keep the existing alignment. | |
| field_id | Yes | ID of the existing field to modify (from `open_pdf`, `list_fields`, or `add_field`, e.g. `'p0_f1'` or `'p0_a1'`). | |
| field_type | No | New field type: `'text'`, `'number'`, `'date'`, `'checkbox'`, `'radio'`, `'signature'`, `'dropdown'`, `'field'`, or `'cell'`. Omit or pass `None` to keep the existing type. | |
| workspace_id | Yes | Active workspace ID returned by `open_pdf` (`summary.workspace_id`). | |
| vertical_align | No | New vertical text alignment: `'top'`, `'middle'`, or `'bottom'`. Omit or pass `None` to keep the existing vertical alignment. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||