PDF tools for AI agents on macOS
Long documents are where agents lose the most time. TokenKit searches a PDF on your Mac and hands the agent page numbers with the text around each hit, instead of the whole file.
The clause you need, with its page number, in seconds.
Search with page references
Case and accents are ignored; several alternatives can be searched at once. Each hit comes with its page number and the surrounding text.
Search and save in one call
Ask for the pages that mention a clause and the same call saves them, in order, as a new PDF. The saved file is read back before the answer is given.
Scanned pages included
Pages without a text layer are read by on-device OCR automatically, so one search covers mixed documents.
Split, merge, compress, build
Extract page ranges, join files, shrink image-heavy PDFs while text stays selectable, or build a PDF from pictures.
Ask your agent
- “Which pages of this contract mention the termination clause? Save them as a separate file.”
- “What does section 12 of the report say about deadlines?”
- “Merge these three PDFs in this order and tell me the page count.”
- “This scan is 30 MB. Make it small enough to e-mail.”
Examples of requests. Your agent chooses what to call; nothing in the request needs to mention TokenKit.
What it covers
Search with page referencesSearch and save in one callScanned pages includedSplit, merge, compress, build
Works in the app and through your agent, inside the folders you allow. Originals are never changed.
What we measured
In our tests with Claude Code, the long-PDF task took a median of 8.8 s with TokenKit against 21.2 s with conventional command-line tools, in three runs per condition. See the benchmarks for the method and its limits. Benchmarks.
Where it stops
- Password-protected PDFs are reported as locked, not opened.
- A digitally signed PDF keeps its signature only in the original; any new file is unsigned, and the answer says so.
- Tables are returned as text in reading order; cell structure is not reconstructed.