pdf_compare
Compare two PDFs page by page to detect text differences. Reports identical pages and trimmed diffs for same-layout documents.
Instructions
Compare two PDFs page by page (by absolute page index) and report text differences. Returns identical:true when text matches. Diffs content-stream-order text (not visual reading order), so it is best for same-layout documents; reflowed or multi-column PDFs produce noisy diffs. Inserting/deleting a page shifts all later pages and reports them as changed. Large diffs are trimmed (truncated:true) to fit the response limit.
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": {
"filePathA": "<filePathA>",
"filePathB": "<filePathB>"
},
"name": "pdf_compare"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePathA | Yes | Absolute path to the first (baseline) PDF file | |
| filePathB | Yes | Absolute path to the second (comparison) PDF file | |
| pages | No | Page range to compare, e.g. '1-5' or '1,3,5'. Defaults to all pages. |