Fix a scanned book
fix_scanTurn a scanned book (PDF or DjVu, up to 1,000 pages) into a clean, searchable PDF for e-readers: pages cropped to the text, straightened, sharp black and white, two-page spreads split, and searchable text added. Use it when the user wants to fix, clean up, OCR or convert a scan for a Kindle, Kobo, reMarkable or tablet. Give exactly one source: file (a file the user attached here), source_url (a public https link to the file) or upload_id (from create_upload_link, after the user uploaded). It returns a scan_id at once and the book converts in the background; then call get_scan_status until it is ready and give the user the download link.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "fix_scan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | A PDF or DjVu file the user attached in this chat. | |
| output | No | bw: sharp black and white, best on e-ink. grey: gentle greyscale. | bw |
| language | No | The book's language for searchable text, as a Tesseract code; auto detects it. | auto |
| upload_id | No | The upload_id from create_upload_link, once the user has uploaded the file. | |
| source_url | No | A public https link to the PDF or DjVu file. | |
| trim_margins | No | Crop each page to its text block. Covers and picture pages stay whole. | |
| split_spreads | No | Split scans of two facing pages into single pages. | |
| idempotency_key | No | Optional. Repeat it on a retry so the same book is not started twice. |