Skip to main content
Glama

JustFill PDF Form Automation

Add a field

add_field

Create a new fillable field on a page when detection missed an input (false negative).

Coordinates (`x`, `y`, `w`, `h`) are in percentages of page width/height
(`0.0`–`100.0`, top-left origin), read off `render_preview`. Assigns a
sequential agent field ID (`p{page_index}_a{n}`) with `confidence=1.0` and
`source="agent"`, and returns the created field object. Allowed `field_type`
values: `'text'` (default), `'number'`, `'date'`, `'checkbox'`, `'radio'`,
`'signature'`, `'dropdown'`, `'field'`, or `'cell'`. Optional `align`
(`'left'`, `'center'`, `'right'`) and `vertical_align` (`'top'`, `'middle'`,
`'bottom'`) control where text sits inside the box.

Persistence & review impact: persists immediately in the active workspace
(`workspace_id`) and invalidates any prior visual review receipt for
`page_index` on ML-detected layouts. Does not alter saved account templates
unless `save_template` is called after filling.

When to use:
- Use `add_field` only to create a missing field that detection missed.
- Use `update_field` (single) or `update_fields` (batch) to move, resize,
  rename, or change the type/alignment of an existing field.
- Use `remove_field` or `remove_fields` to delete false-positive fields.

Input Schema

NameRequiredDescriptionDefault
hYesHeight of the field box as a percentage of page height (`> 0.0` and `<= 100.0 - y`).
wYesWidth of the field box as a percentage of page width (`> 0.0` and `<= 100.0 - x`).
xYesHorizontal position of the box's left edge as a percentage of page width (`0.0` to `100.0`, origin at top-left).
yYesVertical position of the box's top edge as a percentage of page height (`0.0` to `100.0`, origin at top-left).
nameNoShort semantic label for the field (e.g. `'applicant_full_name'`, `'signature_date'`). Stored in the workspace and in templates saved via `save_template`.
alignNoHorizontal text alignment inside the box: `'left'`, `'center'`, or `'right'`. Omit or pass `None` for the default alignment.
field_typeNoField input type: `'text'` (default), `'number'`, `'date'`, `'checkbox'`, `'radio'`, `'signature'`, `'dropdown'`, `'field'`, or `'cell'`.text
page_indexNo0-based page index (`0` to `page_count - 1`) on which to place the new field.
workspace_idYesActive workspace ID returned by `open_pdf` (`summary.workspace_id`).
vertical_alignNoVertical text alignment inside the box: `'top'`, `'middle'`, or `'bottom'`. Omit or pass `None` for the default vertical alignment.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • addedInput schema / properties / align / description
      Added value: +"Horizontal text alignment inside the box: `'left'`, `'center'`, or `'right'`. Omit or pass `None` for the default alignment."
    • addedInput schema / properties / field_type / description
      Added value: +"Field input type: `'text'` (default), `'number'`, `'date'`, `'checkbox'`, `'radio'`, `'signature'`, `'dropdown'`, `'field'`, or `'cell'`."
    • addedInput schema / properties / h / description
      Added value: +"Height of the field box as a percentage of page height (`> 0.0` and `<= 100.0 - y`)."
    • addedInput schema / properties / name / description
      Added value: +"Short semantic label for the field (e.g. `'applicant_full_name'`, `'signature_date'`). Stored in the workspace and in templates saved via `save_template`."
    • addedInput schema / properties / page_index / description
      Added value: +"0-based page index (`0` to `page_count - 1`) on which to place the new field."
    • addedInput schema / properties / vertical_align / description
      Added value: +"Vertical text alignment inside the box: `'top'`, `'middle'`, or `'bottom'`. Omit or pass `None` for the default vertical alignment."
    • addedInput schema / properties / w / description
      Added value: +"Width of the field box as a percentage of page width (`> 0.0` and `<= 100.0 - x`)."
    • addedInput schema / properties / workspace_id / description
      Added value: +"Active workspace ID returned by `open_pdf` (`summary.workspace_id`)."
    • addedInput schema / properties / x / description
      Added value: +"Horizontal position of the box's left edge as a percentage of page width (`0.0` to `100.0`, origin at top-left)."
    • addedInput schema / properties / y / description
      Added value: +"Vertical position of the box's top edge as a percentage of page height (`0.0` to `100.0`, origin at top-left)."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, the description discloses immediate persistence in the active workspace, invalidation of prior visual review receipts for ML-detected layouts, and that saved account templates are not altered unless save_template is called. It also describes the created field ID convention and source/confidence metadata.

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

Conciseness5/5

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

The description is front-loaded with purpose, then coordinates, persistence impact, and usage routing. Despite its length, every section serves a clear function for a 10-parameter mutation tool.

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?

Given the tool's complexity, 10 parameters, annotations, and output schema, the description provides enough context to invoke it correctly. It covers purpose, coordinate semantics, side effects, and alternatives without needing to explain the output schema in detail.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents every parameter, including coordinate ranges, field_type values, alignment options, page_index, and workspace_id. The description reinforces allowed values and adds that coordinates are read off render_preview, but it does not add much parameter meaning beyond the schema.

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 opening sentence states a specific verb, resource, and condition: create a new fillable field on a page when detection missed an input. It clearly distinguishes the tool from sibling update/remove operations.

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?

The 'When to use' section explicitly says to use add_field only for missing fields, and it names update_field, update_fields, remove_field, and remove_fields for their respective cases. This leaves no ambiguity about tool selection.

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.