Skip to main content
Glama

Crypto & Web Data API for Agents

Extract text from a PDF by URL

pdf
Read-only

Extract text from a PDF by URL. Downloads a public PDF (up to 15 MB) and returns its text page by page with title, author and page count. Scanned PDFs without a text layer return little text. Cached 1 h. Price $0.020 per call (x402: USDC on Base or Solana).

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

Input Schema

NameRequiredDescriptionDefault
txNoAlternative to the X-Payment-Tx header
urlYeshttp(s) URL of the PDF
max_charsNo
max_pagesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the readOnlyHint/openWorldHint annotations, the description states the download path (public URL), the 15 MB ceiling, the response shape (text page by page plus title, author and page count), the 1 h cache, the price and the x402 payment rails. Those are exactly the operational facts that change how an agent calls the tool and budgets for it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Five short sentences, front-loaded with the action and followed by constraints, return shape, limitations, cache and price. No sentence is filler, and each adds a distinct fact.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and four parameters, the description carries most of the load and mostly succeeds: it covers the return fields, size limit, failure mode for scanned files and cost. Gaps remain around error behaviour for non-PDF responses and on the two truncation caps.

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

Parameters2/5

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

Schema description coverage is only 50%. The description says nothing about max_chars or max_pages, so how aggressively output is truncated, and whether that truncation is silent, is unclear. It also leaves the tx payment override unexplained; the payment mechanism is described only for the tool as a whole.

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 concrete verb and resource, 'Extract text from a PDF by URL', and narrows the scope to PDFs fetched over HTTP. That clearly separates the tool from generic siblings such as fetch or rss, so an agent can pick it without opening either schema.

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 usable context for when the tool applies: a public PDF at an http(s) URL, at most 15 MB, plus the caveat that scanned PDFs without a text layer yield little text. It never names an alternative for PDFs that are private, oversized or scanned, so the routing guidance stops short of explicit exclusions.

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