Skip to main content
Glama

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

pdf_text
Read-only

Extract the text of a public PDF (up to 10 MB) from its URL, page by page, with title, author and page count. Choose the first page, how many pages (up to 200) and maxChars. arXiv abstract links work. If a site blocks our fetch, the Internet Archive's dated copy is read and the answer says so. Scanned, encrypted and non-PDF files fail uncharged. Use to read papers, invoices, reports and manuals into an agent. 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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>"
    },
    "name": "pdf_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesAbsolute public http(s) URL of the PDF. With no input at all this reads the published sample (the Bitcoin white paper); send url for your own 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 / url / description
      Previous value: -"Absolute public http(s) URL of the PDF"New value: +"Absolute public http(s) URL of the PDF. With no input at all this reads the published sample (the Bitcoin white paper); send url for your own PDF."
  2. Changed6 schema fields changed
    • changedInput schema / properties / firstPage / maximum
      Previous value: -9007199254740991New value: +100000
    • changedInput schema / properties / firstPage / minimum
      Previous value: --9007199254740991New value: +1
    • changedInput schema / properties / maxChars / maximum
      Previous value: -9007199254740991New value: +200000
    • changedInput schema / properties / maxChars / minimum
      Previous value: --9007199254740991New value: +1000
    • changedInput schema / properties / pages / maximum
      Previous value: -9007199254740991New value: +200
    • changedInput schema / properties / pages / minimum
      Previous value: --9007199254740991New value: +1
  3. 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)"
  4. Added

TDQS

A4.1/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: a 10 MB input cap, page/maxChars bounds, the Internet Archive fallback for blocked fetches and that this is disclosed in the response, uncharged failures for scanned/encrypted/non-PDF files, and per-call pricing with 25 free calls. The note that 'each call is charged, so repeats are not free' reconciles the idempotentHint=false annotation with an otherwise read-only operation.

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-loads the core action followed by scope, fallback, failure, use cases, and cost, in a sensible order with an inline example. Minor redundancy between 'failed calls free' and the closing sentence about per-call charging, but every element is relevant to an agent deciding whether to call.

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?

There is no output schema, and the description compensates by naming the return content (title, author, page count, page-by-page text capped by maxChars). With pricing, failure modes, and the archive fallback covered, an agent has everything needed to call it correctly and interpret the result.

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%, so all four parameters are already documented with bounds and defaults. The description only restates them ('choose the first page, how many pages (up to 200) and maxChars'), adding no format or interaction detail such as how maxChars truncates alongside page selection. Baseline 3 applies when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — 'Extract the text of a public PDF (up to 10 MB) from its URL, page by page' — plus the metadata returned (title, author, page count). The PDF-only, URL-only, size-capped scope implicitly separates it from generic siblings like document_text or extract, but no sibling is named explicitly.

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 concrete use cases ('read papers, invoices, reports and manuals into an agent') and a worked example URL, which is clear context for when to reach for it. It stops short of naming alternatives (e.g. document_text, html_to_text) or stating exclusions beyond the failure modes of non-PDF input.

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.