run_pipeline
Chain multiple PDF operations in one call, passing each step's output to the next and saving only the final processed PDF.
Instructions
Run several tools on a PDF in one call, each on the result of the one before, and save only the final result (default: "_processed.pdf"). Each step is {"tool": name, "args": {...}} with the same arguments as that tool, without input_path, output_path, password or overwrite, e.g. [{"tool": "decrypt_pdf"}, {"tool": "delete_pages", "args": {"pages": "1"}}, {"tool": "optimize_pdf"}, {"tool": "encrypt_pdf", "args": {"user_password": "x"}}]. Steps can be the tools that take one PDF and write one PDF: rotate_pages, delete_pages, extract_pages, rearrange_pages, decrypt_pdf, encrypt_pdf (last step only), optimize_pdf, repair_pdf, flatten_pdf, set_metadata, sanitize_pdf, add_watermark, add_page_numbers, fill_form, crop_pages, resize_pages, n_up, insert_blank_pages, set_outline, redact_pdf, ocr_pdf, add_comments, convert_to_pdfa (last step only); up to 20. password opens the input and is used by every step (decrypt_pdf removes it). Every step's arguments are checked before any step runs, and each step applies its tool's own rules. Steps hand files to each other in a private temporary folder, deleted afterwards; if a step fails, nothing is saved.
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>",
"steps": "<steps>"
},
"name": "run_pipeline"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | Yes | ||
| password | No | ||
| overwrite | No | ||
| input_path | Yes | ||
| output_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | Yes | ||
| output | Yes | ||
| password_protected | Yes | ||
| user_password_changed | Yes | ||
| permissions_restricted | Yes |