Skip to main content
Glama

PDF Text Extraction

pdf_extract
Read-only

Extract all text from a PDF. Send as pdf_base64 (base64-encoded PDF, max ~10 MB decoded). Returns text (full concatenated text), pages array (per-page text + char_count), page_count, and metadata (title, author, creator). Encode with: Buffer.from(pdfBytes).toString('base64'). Ideal for RAG pipelines, document QA, or LLM ingestion. Price: $0.0055 USDC per call, paid inside this MCP call via x402 (USDC on Base, Solana, Polygon or Arbitrum). x402 MCP clients such as @x402/mcp pay automatically. Free sample: call with the example input {"pdf_base64":"","max_pages":10}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_pagesNoMaximum number of pages to extract. Default: 50. Use to limit processing time for large PDFs.
pdf_base64YesBase64-encoded PDF file content. Decode a PDF file to base64 and pass it here. Max ~10 MB (unencoded).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds meaningful operational context beyond that: a ~10 MB size ceiling, a per-call price ($0.0055 USDC), and the x402 payment requirement across specific chains. It doesn't discuss failure modes for malformed/non-PDF input or page-truncation behavior, but the payment and size disclosures are genuinely valuable.

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 the action, then input format, return shape, encoding, use cases, and cost. Most sentences earn their place (pricing, encoding, size limit), though the use-case sentence is the softest and the description runs long relative to a two-parameter tool.

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 compensates by enumerating return fields (text, pages array with per-page char_count, page_count, metadata). Combined with input format, size limit, encoding instructions, and pricing, an agent has everything needed to invoke and interpret the call.

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 both parameters are already documented, establishing a baseline of 3. The description reinforces the base64 encoding recipe and supplies a concrete example input, which adds marginal convenience but no new semantics beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Extract all text from a PDF') so the core action is unambiguous. It does not, however, differentiate itself from close siblings like doc_parse, ocr, or page_extract, leaving the agent to infer which is appropriate for a given document.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Offers use-case framing ('Ideal for RAG pipelines, document QA, or LLM ingestion') but no explicit when-to-use/when-not-to-use or named alternatives. In particular it never states that OCR is the right sibling for scanned/image PDFs, which is the key routing decision an agent faces.

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