Skip to main content
Glama

read_pdf

Extract text or images from PDF files for vision LLMs, handling both text and scanned documents with configurable extraction modes.

Instructions

Read PDF content. Always prefer this over cat or file read for PDF files. Limits: 10 pages per request. Works with both text and scanned documents. Use 'image_only' to see actual page layout, or 'text_only' for pure text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesPDF file path (relative or absolute path)
start_pageNoStart page (1-indexed, inclusive)
end_pageNoEnd page (1-indexed, inclusive). None = last page
extraction_modeNoContent extraction mode: - 'auto' (default): Smart detection - extract text/tables, add page image only if corrupted - 'text_only': Extract text/tables only, no images - 'image_only': Skip text extraction, provide only full page imagesauto
filter_header_footerNoWhether to filter out header/footer images (top/bottom 6% of page)
crop_imagesNoWhether to crop images to max_image_dimension
max_image_dimensionNoMaximum image dimension in pixels (default: 842, A4 height)
page_image_dpiNoDPI for page image rendering (default: 100)

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PyJudge/pdf4vllm-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server