Document · Extraction
How read_file converts PDFs, Office documents, and notebooks to text, and what to do when a scanned PDF comes back empty.
The read_file tool automatically converts common document formats to readable text, so the agent can inspect a PDF or spreadsheet the same way it reads source code. Jupyter notebooks, Word documents, and Excel workbooks convert with built-in support. PDFs, legacy Office, OpenDocument, and ebooks use an optional converter that installs on first use. Conversion output is Markdown, paginated through the normal offset and limit window, and documents over 50 MB are refused. PDF conversion reads the text layer only, so scanned pages silently convert to nothing. When a meaningful share of pages yields no text, read_file prepends a coverage warning labeling each unreadable gap, so the agent targets only the gaps it needs. For a few pages, render them to images and read with vision. For many pages, use the OCR and documents skill.
New words here · Plain English
one sentence each · full glossarySources · What this video distills
1 docs page · every command below traces to one of themCommands shown · Copy and paste
each shows the source doc it came frompdftoppm -jpeg -r 150 -f 92 -l 94 document.pdf /tmp/page/ocr-and-documents