Skip to main content
Glama

PDF to Text

dev_pdf_to_text

Fetch a PDF (by URL, SSRF-guarded) or accept it as base64 and extract all readable text with page count. Deterministic parsing — no language model, so nothing is invented. Text-based PDFs only; scanned images need OCR (not included). Use this when an agent needs to extract readable text from any PDF — agents can't read PDFs. x402 price $0.01/call (USDC, eip155:8453).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesOr provide base64 instead
base64YesBase64 content
maxCharsYesMax text length

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

No annotations exist, so the description carries the full load and does it well: URL fetching is SSRF-guarded, parsing is deterministic with no LLM inference, scanned/image PDFs are unsupported, and the x402 price and chain are disclosed. It omits rate limits, input size caps, and what happens on parse failure or non-PDF content, which prevents a 5.

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?

Four tight sentences: capability, input modes, limitation, use case, price — all front-loaded with no filler. The parenthetical "agents can't read PDFs" is mildly redundant given the preceding clause, but the whole is still lean.

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 no annotations, the description steps in to describe the return payload ("all readable text with page count") and the payment model, which is what an agent needs to call it. The one gap is maxChars behavior — whether it truncates output and how truncation is signaled — which matters for a text-extraction tool.

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 baseline is 3. The description does add real value by framing url and base64 as alternative input modes (the schema's ambiguous "Or provide base64 instead" alongside all-required fields reads as contradictory), but maxChars is never mentioned in the description and its truncation behavior remains undefined.

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?

Specific verb+resource ("extract all readable text" from a PDF) with two supported input modes stated up front. It is clearly distinguishable from siblings like dev_text_extract, dev_url_reader, or dev_table_extract because it names the PDF input and the text-output contract.

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?

Gives an explicit use condition ("when an agent needs to extract readable text from any PDF — agents can't read PDFs") and an exclusion ("Text-based PDFs only; scanned images need OCR (not included)"). It stops short of naming the sibling tools it should be preferred over, so an agent must infer the boundary itself.

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