Skip to main content
Glama

Read a PDF

read_pdf
Read-only

Read a local PDF: extract text from pages with a text layer, and use a local vision model for scanned or image-only pages. Optionally limit pages or ask a specific question to avoid full transcription.

Instructions

Read a local PDF. Pages with a text layer are extracted exactly and for free; scanned or image-only pages are rendered and read by a local vision model. Use pages (e.g. "1-5" or "2,7") to limit the work on long documents, and question to search for one fact instead of transcribing everything.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoauto (default): text layer where present, vision for scanned pages. text: never call the model — fastest, exact, but blind to figures. vision: render every page and read it visually — use when the text layer is garbled or you need to understand figures.
pathYesAbsolute or relative path to the PDF file on this machine.
pagesNo1-based page selector, e.g. "1-5", "2,7,9", or "3". Omit for all pages (capped).
questionNoOptional specific question. Omit for a full transcription.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description goes well beyond the readOnlyHint annotation by disclosing the hybrid mechanism: text-layer pages are extracted exactly, while scanned pages are rendered and read by a local vision model. It also mentions the cost implication ('for free') and the optional question-based search, providing valuable behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the purpose, and each sentence earns its place. It is efficient and avoids redundancy with the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity and absence of an output schema, the description covers the main behavior and usage well. It implies the output (text transcription or answer) but does not explicitly describe the return structure. Overall, it is sufficiently complete for most use cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds usage examples for pages and question, but the schema already provides similar details, so the added value is marginal. It does not significantly enhance parameter understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool as reading a local PDF, with a specific verb and resource. It distinguishes from sibling tools by focusing on PDFs, and explains the dual text/vision behavior, which sets it apart from read_image and vision_doctor.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for using the tool (local PDFs, page selection, question-based extraction) but does not explicitly mention exclusions or alternative tools. The guidance on when to use pages and question is helpful, but it lacks an explicit 'when not to use' or alternative tool comparison.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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/jshsakura/mcp-local-vision'

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