Skip to main content
Glama
Jashan-Mshadow

sommus-laptop

read_pdf

Read-only

Extract text from PDFs, including scanned pages via OCR, without screenshotting each page. Specify page ranges to read only what you need.

Instructions

Read a PDF as text, scanned ones included — far cheaper than screenshotting page by page.

Args:
    path: Path to the PDF, e.g. "~/Downloads/MATH117-L3-F26-Fong.pdf".
    pages: Which pages, e.g. "1-5", "3", "2,4,7". Omit for the whole file.
    ocr: Read scanned pages with OCR when they have no text layer (slower, ~3s a page).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ocrNo
pathYes
pagesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true; the description goes beyond that by disclosing OCR behavior and a concrete cost/latency figure (~3s per page) that affects invocation strategy. It does not cover failure modes (missing file, corrupt PDF) or page-numbering conventions.

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?

One front-loaded sentence captures purpose and differentiator, followed by a compact Args block with no filler. Each line of the parameter list earns its place by adding format or cost information.

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 does state the return type ('as text') and all three parameters are documented, so an agent can call it correctly. Minor gaps remain: how multi-page text is delimited, and the fact that ocr defaults to true is left to the schema's default field.

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?

Schema description coverage is 0%, so the description carries the full burden and does: path with a concrete example, pages with three accepted format examples ('1-5', '3', '2,4,7') plus the omit-for-all behavior, and ocr explained as conditional OCR with a speed trade-off. Every parameter gains meaning beyond its bare type.

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+resource ('Read a PDF as text') and immediately adds scope ('scanned ones included'), which distinguishes it from both read_file and screenshot. The comparison to screenshotting tells an agent exactly what niche this tool fills among its siblings.

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 clear selection context: use this rather than screenshotting page by page because it is cheaper, and use the ocr flag for scanned pages lacking a text layer. It never states an exclusion or names a sibling tool for non-PDF files (e.g. read_file), so it stops short of full when/when-not guidance.

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