Fill a PDF form
fill_pdf_formUse this when the user wants to fill in a fillable PDF form with given answers. Pass the attached PDF and a list of {field, value} using the field names from list_form_fields: text for text fields, true/false for checkboxes, one listed option for radio groups and dropdowns (case-insensitive matches are reported), a list for multi-select list boxes. Unknown names, options that are not listed and text over a field's maximum length are refused with the reason, and nothing is filled. Returns a new filled PDF (fields editable, or flattened when flatten is true), read back to confirm each value, plus required fields still empty. Does not sign signature fields, does not change the user's original file, and does not fill XFA-only forms.
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": {
"file": "<file>",
"values": "<values>"
},
"name": "fill_pdf_form"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | The fillable PDF form to fill, e.g. w9-like.pdf. | |
| values | Yes | The values to put in the form, e.g. [{"field":"full_name","value":"Jane Doe"},{"field":"agree","value":true}]. | |
| flatten | No | true: make the filled values part of the page so they are no longer editable. Default false (fields stay editable). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| notes | Yes | ||
| filled | Yes | ||
| skipped | Yes | ||
| verified | Yes | ||
| downloads | Yes | ||
| flattened | Yes | ||
| output_file | Yes | ||
| fields_total | Yes | ||
| filled_count | Yes | ||
| preview_count | No | ||
| empty_required | Yes | ||
| expires_in_hours | Yes | ||
| unsigned_signature_fields | Yes |