Sezzlee PDF

v0.2.0
io.github.sezzlee/pdf Checked 6 hours ago Published 7 days ago

Extract text from local PDF documents with optional pluggable OCR.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_documents

List readable PDF documents under the server root. Returns filePath values that other tools accept verbatim. The listing never opens a file, so a listed path is a candidate, not a guarantee that the document parses. totalExact distinguishes a complete total; scanTruncated is separate from the result page limit.

ParameterTypeDescription
maxResultsintegerMaximum returned files, default 50. Does not increase the traversal budget.
patternstringGlob over the relative path, for example invoices/*.pdf.
subdirectorystringFolder under the root to list.

describe_document

Summarise one PDF: page count, document type, which pages carry no trustworthy text, and whether OCR and page images are available. Use pagesNeedingOcr to identify likely scans and pagesWithoutText to find pages with no readable text, including blank pages. documentType and classificationConfidence come from a separate document-level classifier: the confidence scores that verdict, NOT the accuracy of any extracted text, and the classifier reports a whole document as image-based when a single page is a scan.

ParameterTypeDescription
filePath *stringPath to a PDF document, relative to the server root.

read_pages

Read selected pages as Markdown, one entry per page, with page numbers counted from 1. A page whose text the engine could not trust is returned with needsOcr true rather than omitted, so a scanned page is never presented as an empty one; empty distinguishes a genuinely blank page from an unreadable one. Each page reports source: text when the PDF's own text layer was used, ocr when a provider transcribed it. A page whose Markdown does not fit the response budget is clamped and marked truncatedMarkdown; nextCursor then resumes inside that page. With an explicit pages selection, nextCursor stays…

ParameterTypeDescription
filePath *stringPath to a PDF document, relative to the server root.
cursorstringnextCursor from a previous read_pages response. It carries the selection it was produced for, so it cannot be combined with pages.
maxPagesintegerMaximum pages in one response, default 10. The response byte budget may stop the page earlier.
ocrbooleanTranscribe pages the text layer cannot answer, default false. Requires an OCR provider: describe_document reports whether one is configured. Sends those page images to that provider, which is slow and…
pagesarrayPage numbers to read, counted from 1. Omit to read from the first page.

view_pages

Render selected pages as images for a vision-capable model, including pages without readable text. Requires a configured rasterizer, reported by describe_document as capabilities.pageImages. Returns one image per requested page in request order and a text summary. The page pixels are sent to the caller.

ParameterTypeDescription
filePath *stringPath to a PDF document, relative to the server root.
pages *arrayDistinct page numbers to render, counted from 1.

find_in_document

Find literal text in the extracted page text. The query is matched literally, never as a regular expression or a query language. Pages that need OCR carry no searchable text and are counted in unsearchablePages: when coverageComplete is false, an empty match list means the text was not found in the pages that could be read, NOT that it is absent from the document. Pass ocr to transcribe those pages first and search them too. Case-insensitive matching folds ASCII letters only.

ParameterTypeDescription
filePath *stringPath to a PDF document, relative to the server root.
query *stringLiteral text to look for. Never treated as a regular expression.
caseSensitivebooleanDefault true. When false, only ASCII letters are folded.
cursorstringnextCursor from a previous find_in_document response.
matchModestringSubstring match within a line (default), or whole-line equality after trimming.
maxResultsintegerMaximum matches in one page of results, default 50.
ocrbooleanTranscribe unsearchable pages before searching, default false. Requires an OCR provider; slow, and the page images leave this server.