Skip to main content
Glama

Agent Data Tools: Documents to text

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

TDQS

A4.1/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 input limit, the 200-page ceiling, the Internet Archive dated-copy fallback and that the response surfaces that fallback, and that failures (scanned/encrypted/non-PDF) are uncharged. Pricing ($0.005/call, 25 free, failures free) and the non-free-repeat caveat add genuine operational context that annotations cannot express. The 'reads or computes only and changes nothing' line is consistent with readOnlyHint/destructiveHint=false, and per-call charging is consistent with idempotentHint=false.

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?

Content is front-loaded: capability, limits, fallback behavior, then use case and pricing. Every sentence carries information, though the closing sentence partially restates the earlier pricing and free-failure statements ('each call is charged, so repeats are not free') and could be trimmed.

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?

For a read-only extraction tool with no output schema, it covers what is returned (text plus title, author, page count), the size and page bounds, degraded-path behavior, failure modes and cost model. An agent has enough to decide whether to call it and to predict the outcome, without needing external documentation.

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 url, pages, maxChars and firstPage are already documented with types and defaults. The description restates the page-window concept ('Choose the first page, how many pages (up to 200) and maxChars') and supplies an example URL, but adds no format, unit, or edge-case meaning beyond the schema. Baseline 3 applies when the schema carries the semantics.

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?

The description gives a precise verb+resource ('extract the text of a public PDF... from its URL, page by page') plus a concrete scope constraint (10 MB cap, page-window controls, metadata returned). The 'from its URL' framing helps separate it from upload-style siblings, but no sibling is named, so differentiation still relies on inference.

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 states a use case explicitly ('Use to read papers, invoices, reports and manuals into an agent') and implicitly excludes unsuitable inputs by listing what fails: scanned, encrypted and non-PDF files. It also notes that arXiv abstract links work, which is a real selection hint. It does not point to an alternative tool when the input is scanned or when a raw HTML page is the target.

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.