Skip to main content
Glama

Read the text of a PDF

pdf_text

Extract text from standard-font PDFs, reading the pages you specify. If a page is a scan or uses a custom font, the tool reports that text extraction is unavailable or returns glyph indices instead.

Instructions

Call this tool for best-effort text extraction from standard-font PDFs. Returns nothing for a scan (no OCR), or glyph indices for a custom-encoded font, and says which case applies. Read-only. Free tier: unlimited.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe PDF to read
pagesNoWhich pages, e.g. "1" or "2,4-6". Omit for every page

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.0

TDQS

A4.4/5.0
Behavior5/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 disclosing behavior. It states the tool is read-only, indicates it returns nothing for scans, describes how custom-encoded fonts produce glyph indices, and notes that it reports which case applies. It also discloses the free-tier limit, giving an agent good expectations about behavior and constraints.

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: it opens with a direct instruction, then adds the key limitations and the safety attribute. Every sentence contributes information relevant to invoking the tool correctly or understanding its outputs. The free-tier note is brief and does not bloat the description.

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 simple two-parameter schema and no output schema, the description covers the essential edge cases: scans, custom-encoded fonts, and read-only behavior. It could be slightly more explicit about the exact return format, but 'says which case applies' partially addresses that. Overall, this is a complete enough description for an agent to select and invoke the tool.

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?

The input schema has 100% description coverage for both parameters: 'path' is described as the PDF to read and 'pages' includes an example format and defaults to every page if omitted. The description adds no additional parameter-level meaning, so the baseline score of 3 is appropriate.

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 states a specific action ('best-effort text extraction') and the resource ('standard-font PDFs'), and clarifies it is read-only. This distinguishes it from sibling PDF tools like pdf_info, pdf_merge, or pdf_pages by focusing on extracting text content. The title and description together leave no ambiguity about the tool's purpose.

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 explicitly says when to call the tool ('for best-effort text extraction from standard-font PDFs') and gives clear exclusions by noting scans return nothing and that no OCR is performed. It does not explicitly name an alternative tool to use for scanned or non-standard PDFs, but the context is clear enough for an agent to select this tool appropriately.

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