Skip to main content
Glama

readfetch

readfetch_pdf

Read-only

Paid routes require a funded Base USDC wallet. Use readfetch-client / @readfetch/client or the MCP signing proxy (@readfetch/mcp-x402-proxy). Direct calls without a signing client will stop at 402. Extract text from a PDF (%PDF- magic, not Content-Type). Send exactly one of url (public http(s) link — egress GET, ≤ 20 MB) or content_base64 (bytes you already have — the whole request body is capped at 1 MiB, base64 expansion included; optional filename labels the upload). Returns pages (per-page text), one concatenated markdown body, title, and metadata; $0.005 per document, not per page. max_pages limits extraction (default 50, max 200); documents over 200 pages or above your cap return 413 and are not billed. Scanned/image-only PDFs may return empty text with billed: false and a hint. Prefer readfetch_text or readfetch_scrape for HTML articles; readfetch_fetch for raw PDF bytes without extraction; readfetch_batch for many HTML URLs, not PDFs. Read-only server-side; paid x402 like other routes.

Input Schema

NameRequiredDescriptionDefault
urlNoPublic PDF URL; fetched through egress (≤ 20 MB). Mutually exclusive with content_base64.
filenameNoOptional label when using content_base64 (default upload.pdf); ignored for url-only requests.
max_pagesNoExtract at most this many pages. Default 50; raise up to 200 when the document is longer. Over cap → 413, unbilled.
content_base64NoBase64-encoded PDF bytes. The request body is capped at 1 MiB total — base64 expansion comes out of that, it does not add to it (~0.75 MB of PDF). Mutually exclusive with url; pair with filename when the label matters.

Output Schema

NameRequiredDescriptionDefault
hintNo
pagesNo
titleNo
billedNo
sourceNo
statusNo
markdownNo
metadataNo
page_countNo
content_sha256No

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, and the description confirms 'Read-only server-side'. Beyond that it adds genuinely useful context beyond annotations: the 402-without-signing-client behavior, $0.005 per-document pricing, 413 unbilled over-cap behavior, and empty-text-with-hint for scanned PDFs. Missing detail on return shape and pagination limits it to a 3 rather than higher.

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?

Information-dense and front-loaded with the payment prerequisite and the pair-selection rule, then the billing and limit caveats. Well organized, but the single dense paragraph packs unrelated concerns (auth, limits, billing, sibling routing) together without clear separation, slightly hurting scannability.

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?

Complete for a paid extraction endpoint: it covers input alternatives with size limits, output fields (pages, markdown, title, metadata), billing semantics, edge cases (scanned PDFs, over-cap 413), and sibling routing. An agent has everything needed to call it correctly and interpret the response.

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 all four parameters are documented in the schema itself, making the baseline 3. The description mostly restates the schema's size caps (20 MB egress, 1 MiB body with base64 expansion) and max_pages defaults, adding little new meaning beyond what structured fields already say.

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 and resource ('Extract text from a PDF') and adds a concrete acceptance rule ('%PDF- magic, not Content-Type') that distinguishes it from generic fetch/scrape. The sibling comparison in the final sentences makes it unambiguous which tool handles PDF extraction vs HTML.

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?

Explicit routing guidance: 'Prefer readfetch_text or readfetch_scrape for HTML articles; readfetch_fetch for raw PDF bytes without extraction; readfetch_batch for many HTML URLs, not PDFs.' It also states the input-selection rule ('Send exactly one of url or content_base64') and the payment prerequisite for calls.

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.