Skip to main content
Glama

Extract PDF text

read_pdf_text
Read-onlyIdempotent

Extract text from a PDF, whole or a page range, as numbered lines with page markers. Use it for text-based PDFs; for scanned pages, use read_pdf_page.

Instructions

Text of a PDF, whole or a page range, as numbered lines with page markers (the same numbers as read_text_file). Much cheaper than page images — prefer it; for scans use read_pdf_page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
last_pageNo
first_pageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered. The description adds value beyond them by disclosing the return format (numbered lines with page markers) and the cost/performance tradeoff versus page images, though it does not discuss pagination or very large files.

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?

A single dense sentence front-loads the core function, then the output format, then the routing guidance. Every clause earns its place with no filler.

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 usefully explains the return format, and annotations cover safety; the main gap is the undocumented page-range parameters. Sufficient for correct invocation, short of exhaustive.

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 0%, so the description must carry the parameters. It signals that a page range is supported via 'whole or a page range', mapping to first_page/last_page, but does not name them, state defaults, or clarify inclusivity. Partial compensation only.

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 (text of a PDF, whole or page range) and describes the output shape (numbered lines with page markers). It explicitly distinguishes itself from read_pdf_page (for scans) and links its numbering to read_text_file, so an agent can tell it apart from siblings without opening 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?

Gives explicit when-to-use guidance ('prefer it' because it is cheaper than page images) and names the alternative with its own selecting condition ('for scans use read_pdf_page'). Nothing about tool selection is left to inference.

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