Skip to main content
Glama

draconic21 x402 Data Tools

PDF text extraction (pdfjs-dist, no OCR/table/vendor)

pdf_extract
Read-onlyIdempotent

[PAID — 0.04 USDC on Base via x402] Deterministic PDF -> per-page plain text + metadata, no OCR, no table extraction, no third-party PDF/OCR vendor — text pulled directly from the PDF's own embedded text objects via pdfjs-dist (Mozilla's own PDF.js, Apache-2.0) running in this process. Pass exactly one of url (public http(s) link, SSRF-hardened fetch) or pdf_base64 (raw base64 bytes). Max 10 MiB, max 40 pages processed per call. Scanned/image-only PDFs return empty page text with a warning, never a fabricated OCR guess. $0.04 USDC on Base, paid via x402 by the calling agent's own wallet. Call with no payment_header first to receive the payment requirements; your own wallet pays, never this server's.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPublic http(s) link to a PDF. Mutually exclusive with pdf_base64.
max_pagesNoOptional; defaults to 40 (the route's own cap).
pdf_base64NoRaw PDF bytes, base64-encoded. Mutually exclusive with url. Max 10 MiB decoded.
payment_headerNoOptional. Omit on your first call to receive the x402 payment challenge for free. After your own wallet/x402 client signs against that challenge, call this same tool again with the SAME business arguments plus this field set to the header your x402 client produced (typically { name: "PAYMENT-SIGNATURE", value: "<base64 payload>" }). This server never holds a wallet and never pays on your behalf.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent/openWorld annotations by disclosing hard limits (10 MiB, 40 pages/call), the SSRF-hardened fetch, and the critical failure mode that scanned/image-only PDFs return empty text with a warning rather than a fabricated OCR guess. The payment flow (server never holds a wallet, caller's wallet pays) is also spelled out, which annotations cannot convey.

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 price and purpose, then capabilities, then constraints, then payment mechanics. Dense but nearly every clause carries information; the repeated '$0.04 USDC on Base' statement is the one mildly redundant element.

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?

With no output schema, the description covers the return shape (per-page plain text + metadata), the degenerate case (empty text + warning for image-only PDFs), and the full payment lifecycle, so an agent has everything needed to call it 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 coverage is already 100%, so the baseline is 3; the description adds real value on top by restating the url/pdf_base64 mutual exclusivity, the 10 MiB decoded cap, and the semantics of the payment_header two-step handshake that the schema documents only partially.

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?

States a specific verb+resource ('PDF -> per-page plain text + metadata') plus the exact mechanism (pdfjs-dist) and explicit negations (no OCR, no tables, no vendor), which separates it from generic extraction tools and from the pdf_extract_preview sibling implied by the catalog.

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 operational guidance: pass exactly one of `url` or `pdf_base64`, and make a first call with no payment_header to receive the x402 challenge before paying. It does not, however, explicitly name a sibling alternative (e.g. pdf_extract_preview) or state when a different tool would be preferable.

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