Skip to main content
Glama

PDF to CSV API - extract tables from PDFs and scans into clean CSV

pdf_to_csv
Read-onlyIdempotent

Send a PDF or scanned image as base64 and extract structured tables into clean CSV and JSON rows. Merges multi-page tables and skips repeated page headers automatically, supports comma/semicolon/tab/pipe delimiters, UTF-8 or Excel UTF-8 BOM encoding, optional Page column, and automatic Tesseract OCR fallback for scanned pages. Deterministic local engine (pdfplumber + tesseract), 0 AI, up to 15 pages per call. Free: 5 calls/day per IP. Paid: Radar API key (from €9/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.005/call via x402 at https://radarbg.com/x402/pdf-to-csv.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

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

Input Schema

NameRequiredDescriptionDefault
modeNotables (tables & columns, default), all (tables + text lines), or split (one CSV per table/page as ZIP)tables
encodingNoutf8 (default for scripts/SQL) or utf8-bom (Excel-ready)utf8
fileNameNoOptional file name, e.g. invoice-ledger.pdf
delimiterNoCSV column delimiter: comma (,), semicolon (;) for EU Excel, tab (TSV), or pipe (|)comma
mergePagesNoMerge continuing tables across pages and skip repeated header rows
stripEmptyNoRemove blank rows and trim extra whitespace
fileContentNoThe PDF or image file as base64, max 20 MB (empty = built-in 2-page sample PDF)
ocrLanguageNoOCR language for scanned pageseng
includePageColumnNoAdd a Page column showing which PDF page each row came from

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only cover readOnly/idempotent/openWorld, and the description adds substantial behavior beyond them: 15-page cap per call, deterministic local pdfplumber + Tesseract engine with no AI, automatic OCR fallback, and the full access model (5 free calls/day per IP, X-API-Key paid tier, or x402 per-call billing). These are exactly the operational facts an agent needs before invoking a remote extraction service.

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?

The capability statement is front-loaded in the first sentence, with feature and pricing details following. The middle sentence is a dense feature list that borders on cramming, but each clause carries information an agent would otherwise have to guess.

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?

With no output schema, the description should describe the return payload, and it only gestures at it ('clean CSV and JSON rows', ZIP for split mode per the schema). Limits, auth, and pricing are otherwise thorough for a 9-parameter, zero-required-parameter tool.

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, but the description adds real meaning: it explains that multi-page tables are merged and repeated page headers skipped (the behavior behind mergePages), and clarifies delimiter and UTF-8/BOM choices. It does not cover mode (tables/all/split) or the empty-fileContent sample behavior, so it stops short of full compensation.

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: send a PDF or scanned image as base64 and extract structured tables into CSV/JSON rows. This clearly separates it from siblings like pdf_to_text, pdf_to_excel_word, and image_to_excel_table without needing to open any schema.

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?

The description implies when the tool applies (PDFs or scans with tables, OCR fallback for scanned pages) but never explicitly routes the agent between this tool and nearby alternatives such as pdf_to_excel_word or image_to_excel_table. Usage context is inferable but not stated, and there are no exclusions.

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