Skip to main content
Glama

Pdf text

pdf_text

PDF to text. The text of a public PDF, page by page: pass the http(s) URL of a whitepaper, filing, invoice or paper and get every page's text with page markers, the page count and the file size (up to 15 MB and 200 pages). A file that is not a PDF, will not open or has no text layer (scanned images) is refused before any charge. For a web page use page_extract or page_markdown. $0.003 per call over x402; pass a signed payment in payment to buy inside this call.

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

Input Schema

NameRequiredDescriptionDefault
urlYesthe http(s) URL of a PDF
paymentNoa signed x402 payment (the same base64 payload you would put in the PAYMENT-SIGNATURE header). Pass it here and the purchase completes inside this tool call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: 15 MB / 200 page limits, refusal before charge for invalid or scanned files, and the x402 pricing model. It does not discuss partial failures mid-conversion or output ordering beyond page markers, but the operational picture is largely complete.

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?

Purpose and return shape are front-loaded in the first sentence, followed by limits and the sibling alternative. A few clauses ("whitepaper, filing, invoice or paper") are enumerative padding, but nothing is materially wasteful.

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?

For a two-parameter tool with no annotations and no output schema, the description covers input constraints, size/page limits, rejection behavior, billing, and what the response contains. An agent has enough to invoke it correctly without opening the schema.

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 both `url` and `payment` are already documented in the schema. The description adds the "public" qualifier on the URL and repeats that payment is supplied via the `payment` field for in-call purchase, which is minimal added meaning beyond the structured data.

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?

"PDF to text" plus a concrete description of the resource (a public PDF at an http(s) URL) and the output (per-page text with page markers, page count, file size). It also explicitly contrasts itself with page_extract and page_markdown for web pages, so an agent can separate it from the sibling extractors.

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?

It states when to use it (whitepaper, filing, invoice, paper), when not to use it ("For a web page use page_extract or page_markdown"), and which inputs will be rejected (non-PDF, unopenable, no text layer). That is explicit routing guidance in both directions.

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