get_pdf_images
Extract specific pages or page ranges from PDFs as images for visual analysis of charts, diagrams, tables, figures, equations, and handwritten content that text extraction cannot capture.
Instructions
Extract specific pages or page ranges from a PDF as images for visual analysis. Essential for understanding charts, diagrams, tables, figures, mathematical equations, handwritten content, or any visual elements that text extraction cannot capture. Use when you need to see the actual layout, formatting, or visual content. Supports Python-style slicing: '5' (single page), '5:10' (range), '7:' (from page 7 to end), ':5' (from start to page 5). Returns images as base64-encoded data in MCP image format. Use either absolute_path for any location or relative_path for files in ~/pdf-agent/ directory.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| absolute_path | No | Absolute path to the PDF file (e.g., '/Users/john/documents/report.pdf') | |
| relative_path | No | Path relative to ~/pdf-agent/ directory (e.g., 'reports/annual.pdf') | |
| use_pdf_home | No | Use PDF agent home directory for relative paths (default: true) | |
| page_range | No | Page range in enhanced Python-style format: '5' (page 5), '5:10' (pages 5-10), '7:' (page 7 to end), ':5' (start to page 5). Also supports comma-separated combinations: '1,3:5,7' (pages 1, 3-5, and 7), '1-3,7,10:' (pages 1-3, 7, and 10 to end). Default: '1:' (all pages) | 1: |
| format | No | Image format: 'jpeg' (smaller file size) or 'png' (higher quality). Default: 'jpeg' | jpeg |
| quality | No | JPEG quality (1-100) - only applies to JPEG format. Higher = better quality but larger size. Default: 85 | |
| max_width | No | Maximum image width in pixels (100-3000). Images will be resized proportionally if larger. Optional. | |
| max_height | No | Maximum image height in pixels (100-3000). Images will be resized proportionally if larger. Optional. |