Skip to main content
Glama

JustFill PDF Form Automation

Update many fields

update_fields
Destructive

Batch-update multiple existing fields in the active workspace in a single call.

Each item in `updates` is `{"field_id": ..., x?, y?, w?, h?, name?,
field_type?, align?, vertical_align?}`. Only keys provided with non-`None`
values overwrite the target field's attributes; omitted keys keep their
existing values, and edited ML fields (`source="ml"`) are promoted to
`source="agent"` (`confidence=1.0`).

Partial-failure & persistence semantics: unknown `field_id`s are skipped and
reported in `unknown_field_ids` while all valid updates in the batch are
applied and listed in `updated`. However, an invalid `field_type`, `align`,
or `vertical_align` raises an error and aborts the entire batch without
saving partial edits. Changes persist immediately in `workspace_id` without
affecting saved templates unless `save_template` is called.

When to use:
- Prefer `update_fields` over repeated `update_field` calls whenever renaming,
  repositioning, or resizing 2 or more fields at once.
- Use `update_field` for a single field, or `add_field` to create new fields.

Input Schema

NameRequiredDescriptionDefault
updatesYesList of partial-update dicts, each with `'field_id'` (str) plus any attributes to modify: `'x'`, `'y'`, `'w'`, `'h'` (float, `0.0`–`100.0` % of page), `'name'` (str), `'field_type'` (`'text'|'number'|'date'|'checkbox'|'radio'|'signature'|'dropdown'|'field'|'cell'`), `'align'` (`'left'|'center'|'right'`), or `'vertical_align'` (`'top'|'middle'|'bottom'`). Omitted keys keep their existing values.
workspace_idYesActive workspace ID returned by `open_pdf` (`summary.workspace_id`).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / updates / description
      Added value: +"List of partial-update dicts, each with `'field_id'` (str) plus any attributes to modify: `'x'`, `'y'`, `'w'`, `'h'` (float, `0.0`–`100.0` % of page), `'name'` (str), `'field_type'` (`'text'|'number'|'date'|'checkbox'|'radio'|'signature'|'dropdown'|'field'|'cell'`), `'align'` (`'left'|'center'|'right'`), or `'vertical_align'` (`'top'|'middle'|'bottom'`). Omitted keys keep their existing values."
    • addedInput schema / properties / workspace_id / description
      Added value: +"Active workspace ID returned by `open_pdf` (`summary.workspace_id`)."
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations (destructiveHint=true, openWorldHint=false), the description discloses partial-failure semantics: unknown field_ids are skipped and reported while valid updates apply, but an invalid field_type/align/vertical_align aborts the whole batch with no partial save. It also explains ML-to-agent promotion with confidence=1.0 and that edits persist to the workspace but not to templates unless save_template is called.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then semantics, then a scannable 'When to use' list — well organized. The literal dict sketch of update keys duplicates the schema's list of the same fields, costing a line of redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive batch mutation, the description covers atomicity, skip-vs-abort behavior, persistence scope, and template interaction; an output schema exists so return-shape detail is unnecessary, and it still names the key result keys (updated, unknown_field_ids).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so baseline is 3; the description adds the non-obvious semantic that omitted keys preserve existing values and that editing an ML field flips source to agent. The inline item-shape sketch largely repeats the schema's own enumeration of allowed values, so it earns 4 rather than 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb and resource ('Batch-update multiple existing fields in the active workspace') plus the batching scope, and later text explicitly distinguishes it from update_field and add_field. An agent can route between the three without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

A dedicated 'When to use' block states the selection rule ('prefer update_fields ... whenever ... 2 or more fields at once') and names the alternatives for the single-field and create cases. Exclusions and alternatives are explicit, not inferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.