Skip to main content
Glama

PDF to text: send an https link or base64 and get the text

pdf
Read-only

PDF to text: send an https link or base64 (up to 15 MB) and get the text page by page plus title, author, page count and dates. Text PDFs only: a scanned PDF without a text layer answers 422 and is not charged. Takes about 17 s; allow a 30 s timeout. Price: $0.003 in USDC per successful call, paid with x402 (Base, Solana or Arc); failed calls are not charged.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNohttp(s) link to a PDF
maxCharsNoCut the text at this many characters, 1000-500000, default 100000
pdf_base64NoAlternative: the PDF as base64

Output Schema

NameRequiredDescriptionDefault
noteNo
textNo
charsNo
pagesNo
titleNo
authorNo
byPageNo
creatorNo
subjectNo
producerNo
createdAtNo
truncatedNo
modifiedAtNo
pagesReturnedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "author": {},
      +    "byPage": {},
      +    "chars": {},
      +    "createdAt": {},
      +    "creator": {},
      +    "modifiedAt": {},
      +    "note": {},
      +    "pages": {},
      +    "pagesReturned": {},
      +    "producer": {},
      +    "subject": {},
      +    "text": {},
      +    "title": {},
      +    "truncated": {}
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnly and openWorld annotations, it discloses latency, timeout guidance, the 422 failure mode, non-charging on failure, and per-call USDC pricing across three chains. That is substantive behavioral context for a paid external conversion.

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?

A single dense paragraph that front-loads purpose and then layers in limits, latency, and pricing without repeating the schema. Every sentence carries operational information.

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 paid, network-bound file conversion with an output schema and clear annotations, the description covers scope, input limits, failure semantics, timing, and cost. An agent has enough to decide whether and how to call it.

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 coverage is 100%, so the schema already documents all three parameters. The description adds the 15 MB size ceiling for URL/base64 inputs but does not explain maxChars, so it adds only partial meaning beyond the structured fields.

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 specific verb and resource, says exactly what input forms are accepted, and states the returned payload includes text page by page plus metadata. The 'Text PDFs only' clause further distinguishes it from OCR-style siblings.

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 clear usage conditions: https link or base64, 15 MB ceiling, and a hard when-not case where scanned PDFs without a text layer return 422. It does not explicitly name a fallback sibling such as ocr, so routing is inferable rather than fully spelled out.

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