Skip to main content
Glama

Read the text of a PDF

pdf_text
Read-onlyIdempotent

Extract text from standard-font PDFs, with optional page selection. Returns no text for scanned PDFs and flags custom-encoded fonts that yield glyph indices.

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.1/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive and closed-world, but the description adds genuinely new behavioral context: scans yield nothing, custom-encoded fonts yield glyph indices, and the tool reports which case occurred. It also discloses a 'Free tier: unlimited' cost/quota trait the annotations do not carry.

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

Conciseness4/5

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

Four short sentences, front-loaded with the core purpose and the failure modes immediately after; nothing is padded. The 'Read-only' clause is mildly redundant with readOnlyHint=true, which keeps it from a 5.

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?

With no output schema, the description carries the return-value burden and does explain the two degraded outcomes and that the tool signals which applies. It does not describe the shape of a normal successful return (e.g., plain concatenated text vs. per-page), leaving a modest gap for a read 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?

Schema description coverage is 100% with only two simple parameters (path, pages) fully documented in the schema, including the page-range syntax. The description adds no additional parameter meaning, so the baseline 3 applies.

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?

States a specific verb and resource ('best-effort text extraction from standard-font PDFs'), and the scoping to standard-font PDFs separates it from generic PDF siblings such as pdf_info, pdf_pages, and pdf_merge. An agent can select it over those without opening any schema.

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?

Gives a clear usage condition ('for best-effort text extraction from standard-font PDFs') and effectively rules out scanned documents ('Returns nothing for a scan (no OCR)'), which functions as a when-not-to-use signal. It stops short of naming an alternative tool (e.g., for OCR or metadata), so it is not a full routing directive.

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

Deploy Server

Other Tools