TruePath PDF

v0.3.0
io.github.JoyTruepath/truepath-pdf-mcp Checked 12 hours ago Published 5 months ago

Local-only PDF tools for AI — extract text, search, split/merge, render pages.

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

get_info Get PDF info

Return page count, first-page size, encryption status, and embedded metadata (title, author, dates, producer, etc.) for a local PDF.

ParameterTypeDescription
path *stringAbsolute path to a PDF on the local filesystem.

extract_text Extract text

Extract plain text from a local PDF. Optionally restrict to a page range like "1-5" or "1,3,5-7". Output is split by page with === Page N === markers.

ParameterTypeDescription
path *stringAbsolute path to a PDF on the local filesystem.
pagesstringPage range (1-based). Examples: "3", "1-5", "1,3,5-7". Omit for all pages.

split Split PDF

Split a PDF into multiple PDFs by page ranges. Each range becomes one output file written into outputDir.

ParameterTypeDescription
path *stringAbsolute path to the source PDF.
ranges *arrayPage ranges to split into separate output PDFs, 1-based. Examples: ["1-3", "4-7", "8"] produces three files. Each range becomes one output PDF.
basenamestringStem for output filenames. Default = source filename without .pdf. Final names look like '<basename>-1-3.pdf'.
outputDirstringDirectory to write outputs into. Defaults to the source PDF's directory.

merge Merge PDFs

Combine two or more PDFs into one, preserving page order. Outputs to a caller-specified path.

ParameterTypeDescription
outputPath *stringAbsolute path for the combined output PDF. Its parent directory will be created if missing.
paths *arrayTwo or more absolute PDF paths to combine, in order. The result preserves pages in the order given.

pages Edit pages (rotate / delete / reorder)

One-pass page editor. Delete pages, rotate specific pages by 90°/180°/270°, and reorder the result — in any combination. Page numbers in `rotate` refer to the SOURCE PDF; `reorder` refers to post-delete positions.

ParameterTypeDescription
outputPath *stringAbsolute path to write the result to.
path *stringAbsolute path to the source PDF.
deletestringPages to delete, 1-based, comma/range form. Example: "1,3,5-7". Applied BEFORE rotate and reorder.
reorderarrayNew page order, expressed as 1-based positions in the post-delete output. Example: [3,1,2] puts page 3 first. Must be a permutation of all surviving pages.
rotatearrayPer-page absolute rotations applied to pages that survive the delete step. Page numbers refer to the SOURCE PDF, not the post-delete one — easier to reason about.

to_images Render pages to images

Rasterize PDF pages as PNG or JPG at a chosen DPI. Useful for previews, OCR pipelines, or feeding pages back to a vision model.

ParameterTypeDescription
outputDir *stringDirectory to write the rendered images into.
path *stringAbsolute path to the source PDF.
basenamestringStem for output filenames. Default = source filename without .pdf. Final names: '<basename>-001.png' (page number padded to 3 digits).
dpiintegerRender resolution. Default 150. PDF native is 72; common values: 96 screen, 150 print preview, 300 print.
formatstringOutput format. Default "png". "jpg" is smaller but lossy.
jpgQualityintegerJPEG quality 40-100. Default 85. Ignored for PNG.
pagesstring1-based page range, e.g. "3", "1-5", "1,3,5-7". Omit for all pages.

extract_images Extract embedded images

Pull embedded images out of a PDF and write each as a PNG. Unsupported pixel layouts (e.g. CMYK, palettized) are skipped and reported.

ParameterTypeDescription
outputDir *stringDirectory to write extracted images into.
path *stringAbsolute path to the source PDF.
basenamestringStem for output filenames. Default = source name. Final form: '<stem>-p001-img01.png'.
pagesstring1-based page range. Omit for all pages. Format: "1-5" or "1,3,5-7".

open_in_truepath Open in TruePath PDF (Mac app)

Hand a local PDF to the TruePath PDF Mac app via its truepath:// URL scheme so the user can finish work in a GUI (annotate, sign, fill forms, redact). The bridge is fire-and-forget — the app handles opening from there. Requires the app installed (https://joytruepath.com/truepath-pdf).

ParameterTypeDescription
path *stringAbsolute path to the PDF to open in the TruePath PDF Mac app.
schemestringURL scheme of the receiving app. Default "truepath". Set this if you're handing off to a re-branded build of the engine — e.g. "yochenpdf" for the Yochen core build, or whatever urlScheme the destin…