Skip to main content
Glama

Agent Data Tools: Web, documents and search

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 10 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. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnlyHint=true, destructiveHint=false, openWorldHint=true), yet the description adds substantial behavior beyond them: a 10 MB fetch limit, the Internet Archive fallback with disclosure in the answer, uncharged failures, and per-call pricing. The note that 'each call is charged, so repeats are not free' also correctly explains why idempotentHint is false despite the read-only nature.

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?

Purpose, limits, failure modes and example are front-loaded in the first two sentences, with pricing and read-only assurances trailing. It is information-dense and every clause carries content, though the pricing/billing sentence is the least essential part of a tool-selection description.

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 still tells the agent what comes back (text per page plus title, author and page count) and how the fallback copy is signalled in the response. Combined with limits, failure modes and cost, it is complete enough to call the tool correctly without opening anything else.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds value by stating the page cap in prose (up to 200) alongside the size limit and by showing a worked url example. It does not add format or syntax detail for maxChars or firstPage beyond the schema, so it sits above baseline rather than at the top.

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?

The description opens with a specific verb and resource ('Extract the text of a public PDF ... from its URL, page by page') and immediately enumerates what is returned (title, author, page count), which separates it from generic siblings like html_to_text or document_text. A concrete example URL is supplied so the agent has no ambiguity about input shape.

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?

It gives clear positive contexts ('Use to read papers, invoices, reports and manuals into an agent'), notes that arXiv abstract links work, and defines when the tool is the wrong pick ('Scanned, encrypted and non-PDF files fail uncharged'). It does not name a sibling alternative for the non-PDF case (e.g. document_text), which is the only gap keeping this from a 5.

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.

Resources