pdfedit-mcp
v0.1.10Edit text inside existing PDFs: replace, delete, redact, insert, fill forms; original fonts kept.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
pdf_edit Edit a PDF
Edit the text of an existing PDF in place: replace, delete, redact, insert, or fill form fields, keeping the original layout, fonts and everything you did not point at. `edits[]` is taken exactly as the API takes it (`op`, `scope`, `match`, `fit`), and the result carries up to 3 before/after previews of the pages that changed. To change text on one page only, set `scope.pages`; to pick one of several identical matches, use `scope.after` with nearby text or `scope.occurrence`. Use `op: 'redact'` when the text must be unrecoverable.
| Parameter | Type | Description |
|---|---|---|
edits * | array | The edits to apply, in order, exactly as `POST /v1/edit` takes them. |
file * | string | The PDF: an absolute (or ~) local path, which this server uploads for you, an https:// URL the API fetches, or an `f_…` file id from an earlier call. |
options | object | |
output_path | string | Where to write the edited PDF (stdio mode only). Default: `<name>.edited.pdf` next to the input, or `<name>.edited.2.pdf`, `.3.pdf`, ... when that exists; an earlier result is never overwritten. |
password | string | The document open password, when it has one. |
pdf_batch Batch-edit a PDF template
Apply the same edits to one template PDF once per record, producing one output document per record — a mail merge over an existing PDF. Returns a `job_id`: call `pdf_job` with it for the per-record results. To change text on one page only, set `scope.pages`; to pick one of several identical matches, use `scope.after` with nearby text or `scope.occurrence`. Use `op: 'redact'` when the text must be unrecoverable.
| Parameter | Type | Description |
|---|---|---|
edits * | array | The edits applied to each record, with `{field}` placeholders filled from it. |
file * | string | The PDF: an absolute (or ~) local path, which this server uploads for you, an https:// URL the API fetches, or an `f_…` file id from an earlier call. Used as the template for every record. |
options | object | |
password | string | |
records | array | One object per output document. |
records_url | string | A CSV or JSONL file of records, instead of `records`. |
pdf_find Read the text of a PDF
Read the text of a PDF: every span with its page, position, font and span id, optionally filtered by `query` (the same four `match` modes an edit uses) and `pages`, over the `content`, `forms` and `annotations` layers. Paginated: pass the returned `next_cursor` back as `cursor` for the next page. Use it before `pdf_edit` to check what a document actually says and to pick the `scope` that selects the match you mean.
| Parameter | Type | Description |
|---|---|---|
file * | string | The PDF: an absolute (or ~) local path, which this server uploads for you, an https:// URL the API fetches, or an `f_…` file id from an earlier call. |
cursor | string | null | |
layers | array | |
limit | integer | (default: 200) |
match | object | |
pages | ||
password | string | |
query | string | null |
pdf_preview Render a PDF page
Render one page of a PDF as a PNG image block, optionally cropped to `region` and with rectangles drawn over `highlight`. Use it to see a page before editing it, or to check the result afterwards.
| Parameter | Type | Description |
|---|---|---|
file * | string | The PDF: an absolute (or ~) local path, which this server uploads for you, an https:// URL the API fetches, or an `f_…` file id from an earlier call. |
highlight | ||
page | integer | (default: 1) |
password | string | |
region | ||
scale | (default: 2) |
pdf_job Job result
The result of an async edit or a batch, by `job_id`: the same body `pdf_edit` returns once the job is done, plus `progress` while it is still queued or running, and `records` for a batch.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | The `job_id` an async edit or a batch returned. |
output_path | string | Where to write the finished document (stdio mode, single-document jobs only). |