| name | pdf-text |
| description | Extract text from a PDF in the workspace. Use when: the user asks to read, summarise, or search a PDF. NOT for: editing PDFs (use a dedicated tool) or images (no OCR yet). |
| metadata | {"all_agents":{"emoji":"📄","requires":{"bins":["pdftotext"]}}} |
PDF Text Extraction
Use run_command to invoke pdftotext (poppler-utils).
run_command { command: "pdftotext -layout 'docs/file.pdf' -" }
The -layout flag preserves columns. Stdout is the extracted text;
parse it as plain markdown-ish content.
Install hint
If pdftotext is missing: apt install poppler-utils (Linux) or
brew install poppler (macOS). Surface this to the user — don't try
fallbacks.