Skip to main content
Glama

pdf_read

Extract text from PDFs that have a text layer (born-digital). Use page ranges and character caps for selective extraction.

Instructions

Extract text from a PDF's text layer. Fast and cheap; use for born-digital PDFs.

For scanned PDFs (no text layer, check with pdf_info) use pdf_ocr or pdf_view.

Args: source: Local file path or direct http(s) URL to a PDF. pages: Page selection like '1-5' or '2,4,9-12'. Empty = whole document. max_chars: Character cap for the result (0 = default cap of 20000). preserve_layout: Keep original physical layout (tables/columns line up).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagesNo
sourceYes
max_charsNo
preserve_layoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals that the tool operates on the text layer, mentions performance ('Fast and cheap'), and discloses the default character cap (20000) and the layout-preservation option. It does not detail error handling or potential side effects (e.g., encrypted PDFs), but for a read operation this is adequate and adds meaningful context beyond the tool name.

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 compact and front-loaded: the core purpose and usage-scoping appear in the first sentence, followed by a clear exclusion for scanned PDFs and a structured Args list. Every sentence earns its place without fluff or repetition.

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

Completeness5/5

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

Given that an output schema exists (return structure is presumably covered there), the description provides all necessary information for correct invocation: what it does, when to use it, how to select pages, cap results, and preserve layout. The sibling-tool context and the explicit routing to pdf_info/pdf_ocr/pdf_view make it self-contained and complete.

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

Parameters5/5

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

The schema has 0% description coverage, so the per-parameter explanations in the description are vital. Each parameter (source, pages, max_chars, preserve_layout) is fully explained with examples, defaults, and effects, which goes far beyond the bare schema titles. This fully compensates for the schema's lack of descriptions.

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 opens with a specific verb-resource pair ('Extract text from a PDF's text layer') and immediately scopes it to born-digital PDFs. It explicitly distinguishes from sibling tools by naming pdf_ocr and pdf_view for scanned PDFs, so the agent can tell them apart without opening their schemas.

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

Usage Guidelines5/5

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

It states exactly when to use this tool ('born-digital PDFs') and when not ('scanned PDFs ... use pdf_ocr or pdf_view'), and even tells the agent to check with pdf_info first. This is explicit routing guidance with exclusions and alternatives, leaving no room for misinterpretation.

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/Builderstar/openmedia-mcp'

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