pdf_repair
Repair damaged PDF documents by loading with lenient parsing, copying recoverable pages, and saving a clean file to resolve cross-reference or object errors.
Instructions
Attempt to repair a damaged or malformed PDF by loading it with lenient parsing, copying all recoverable pages to a clean document, and re-saving. May fix issues like corrupted cross-reference tables or orphaned objects.
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": {
"filePath": "<filePath>",
"outputPath": "<outputPath>"
},
"name": "pdf_repair"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to the damaged PDF | |
| outputPath | Yes | Path for the repaired PDF |