Skip to main content
Glama

PDF to text, page by page: extract the text of a PDF document from a URL, page by page

pdf_text
Read-only

Download a public PDF (up to 10 MB) and return its text page by page, with title, author, page count and character counts. Choose a first page and how many pages to read (up to 200) and cap the output with maxChars. arXiv abstract links are read as their PDF. Scanned PDFs without a text layer, encrypted files and non-PDF URLs fail uncharged. Use to read papers, invoices, reports and manuals into an agent's context. Example: url=https://bitcoin.org/bitcoin.pdf. Price $0.005/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
urlYesAbsolute public http(s) URL of the PDF
pagesNoHow many pages to read (1-200, default 20)
maxCharsNoMaximum characters of text returned across all pages (1000-200000, default 50000)
firstPageNoFirst page to read (default 1)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / pages / description
      Previous value: -"How many pages to read (1-200, default 50)"New value: +"How many pages to read (1-200, default 20)"
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations, it discloses the 10 MB download cap, the 200-page and maxChars ceilings, which inputs fail, that failures are uncharged, the $0.005/call price with 25 free calls, and — crucially — why repeats are not free, which explains the idempotentHint=false flag rather than just restating it. The 'reads or computes only and changes nothing' line is consistent with readOnlyHint=true and adds the cost-relevant caveat.

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?

Front-loaded with the operation and output, then constraints, then pricing — the ordering an agent needs. It is dense and a few clauses duplicate structured data (the maxChars cap, the read-only reassurance), but the example URL and failure list both earn their space.

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?

With no output schema, the description compensates by naming the returned fields (text per page, title, author, page count, character counts), and it covers size limits, failure modes, and billing. An agent has everything needed to decide to call it and to predict the result shape.

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 coverage is 100%, so every parameter already carries its own description and ranges. The description restates firstPage/pages/maxChars behavior ('cap the output with maxChars') without adding format, ordering, or edge-case semantics beyond the schema, 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 ('Download a public PDF and return its text page by page') and enumerates exactly what comes back, which separates it from HTML-oriented siblings like extract, extract_rendered, and contents. The arXiv note further pins down an ambiguous input case that an agent could otherwise misroute to papers or search.

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?

'Use to read papers, invoices, reports and manuals into an agent's context' gives concrete positive guidance, and the failure list (scanned PDFs without text layer, encrypted files, non-PDF URLs) sets hard exclusions. It stops short of naming a sibling alternative for HTML pages, so no explicit routing rule between pdf_text and extract is provided.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.