Skip to main content
Glama

PDF to text

pdf_to_text
Read-only

Read a PDF from a URL as text, page by page, with its title, author and page count. Works on text-layer PDFs up to 25 MB and 300 pages; scanned PDFs without a text layer are refused at no charge.

$0.005 USDC per call over x402. Failed calls cost nothing. Call without payment to get a quote. The first 3 calls a day through this tool server are free (no wallet needed).

When to use: The link is a PDF (a filing, paper, contract or manual) and you need its text. Use instead: read_page for an ordinary web page. Parameters: url: absolute http(s) URL of the PDF. max_pages: read at most this many pages, 1-300, default 50. Returns: title, author, page_count, pages_read and pages[] of text in order. Scanned PDFs with no text layer are refused at no charge.

Input Schema

NameRequiredDescriptionDefault
urlYesAbsolute http(s) URL of a PDF.
paymentNoBase64 x402 payment payload. Omit it to receive a quote; sign that and call again.
max_pagesNoRead at most this many pages (default 50).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only cover readOnlyHint and openWorldHint; the description adds the costly details an agent cannot get elsewhere: the 25 MB / 300-page ceiling, refusal of text-layer-less PDFs at no charge, $0.005 USDC pricing under x402, failed calls being free, and the three-free-calls-per-day quota. The quote-then-sign payment handshake is also spelled out, so no annotation contradiction exists.

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 the core action, then cleanly sectioned into pricing, 'When to use', 'Use instead', 'Parameters', and 'Returns'. It runs long for a three-parameter tool and repeats the 'scanned PDFs without a text layer are refused at no charge' clause in both the intro and the Returns section, which is the only wasted text.

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, so the description correctly enumerates the return shape (title, author, page_count, pages_read, ordered pages[] of text). Combined with the stated size/page limits, refusal behavior, and the x402 payment/quota mechanics, an agent has everything needed to call this correctly on the first attempt.

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 description coverage is 100%, so a baseline of 3 is warranted, but the description adds useful framing: url must be an absolute http(s) PDF link, max_pages is bounded 1–300 with a default of 50, and the payment parameter's workflow (omit it for a quote, sign and call again) is explained in prose rather than left to the field blurb.

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?

Opens with a concrete verb+resource ('Read a PDF from a URL as text, page by page') and enumerates what comes back (title, author, page count). It explicitly distinguishes itself from the closest sibling by naming read_page for ordinary web pages, so an agent can pick correctly without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Contains an explicit 'When to use' condition (the link is a PDF — filing, paper, contract, manual) and an explicit 'Use instead' alternative (read_page for ordinary web pages). The limits section also tells the agent when the tool will refuse (scanned PDFs, >25 MB, >300 pages), which is actionable routing information.

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.