Skip to main content
Glama

Agent Data Tools: Web, documents and search

Extract text from a PDF URL

pdf_extract
Read-only

Extract text from a PDF by URL: the text of each page of a public PDF file (up to 10 MB), with the page count, title and author; scanned PDFs without a text layer fail uncharged. Use to read reports, papers, invoices and filings into an LLM, RAG or 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.

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_extract"
  }
}

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. 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 size cap, the explicit failure mode for scanned PDFs without a text layer, and that failures are not billed — which is critical given a per-call cost. It also spells out the billing model ($0.005/call via x402 USDC or card key, first 25 free, no free repeats), 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?

Front-loaded with purpose, then constraints, then billing, then the read-only assurance — a sensible order, and the example URL is cheap and useful. Minor redundancy: 'scanned PDFs ... fail uncharged' is restated as 'failed calls free', and 'Reads or computes only and changes nothing' duplicates readOnlyHint/destructiveHint.

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 carries the return-shape burden and does so: per-page text, page count, title, author. Combined with size limits, failure mode and pricing, an agent has everything needed to decide and call correctly without opening anything else.

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 fully documented with ranges and defaults. The description adds no parameter-level meaning beyond the schema — it never explains the pages/maxChars/firstPage interaction or truncation behavior when maxChars cuts a page short. Baseline 3 is appropriate.

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+resource ('Extract text from a PDF by URL') and immediately enumerates the return payload: per-page text plus page count, title and author. It also bounds the input domain (public PDF up to 10 MB), so an agent knows exactly what class of resource this operates on.

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 concrete when-to-use scenarios — 'read reports, papers, invoices and filings into an LLM, RAG or an agent's context' — plus a worked example URL. It stops short of naming when not to use it or which sibling (pdf_text, extract_rendered, extract) to prefer for text-layer-less or JS-rendered PDFs, leaving that routing to inference.

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.