fill_form
Populate PDF form fields with validated values, optionally flattening the result into a static document.
Instructions
Fill in form fields: values maps each field's full name to its value.
Text and choice fields take text; checkboxes take true/false; radio groups take one of their options, or "Off" to clear (see list_form_fields). Multi-select list boxes take a single value. Every value is checked first and nothing is written if any is invalid. If unrenderable_fields is not empty, the form's font can't draw those values: they are stored, and most viewers redraw them correctly. flatten=true makes the result static (no longer editable), which needs the owner password if the PDF forbids changing comments or changing it. Signed PDFs are refused because filling would break the signature.
Any password argument can be "ask": the user then types it on a local page, so it never passes through the chat.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"input_path": "<input_path>",
"values": "<values>"
},
"name": "fill_form"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| values | Yes | ||
| flatten | No | ||
| password | No | ||
| overwrite | No | ||
| input_path | Yes | ||
| output_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filled | Yes | ||
| output | Yes | ||
| flattened | Yes | ||
| xfa_removed | Yes | ||
| password_protected | Yes | ||
| unrenderable_fields | Yes | ||
| usage_rights_removed | Yes | ||
| user_password_changed | Yes | ||
| permissions_restricted | Yes |