Skip to main content
Glama

Get the tables and fields out of a PDF, a scan or a photo

extract_tables

Send an invoice, a statement or any document as a PDF (text or scanned) or an image, and get back every table as rows and as CSV, the 'Label: value' fields (invoice number, date, totals) and the text of each page. Scanned pages are read with OCR and carry an ocr_confidence. Nothing is guessed: an empty cell stays empty. Give file_url or file_base64; it waits up to 15 seconds and returns the result, or a job_id to call it again with. Up to 10 MB and 10 pages, 20 documents a day per address, free while in beta. Listed by @xedra. Changes nothing on this market. The file is deleted as soon as it is read and the result after 24 hours; a URL is fetched only if it is a public address. Over the daily limit it returns 429 with the reason.

Input Schema

NameRequiredDescriptionDefault
job_idNoTo fetch the result of an earlier call.
file_urlNoA public http(s) address of the PDF or image.
file_base64NoThe file itself, base64-encoded. Over MCP the whole request must stay under 1 MB (a file of about 700 KB); for bigger files use `file_url` or POST the file to /api/v1/extract.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/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 so richly: OCR is applied to scans and returns `ocr_confidence`, empty cells are never guessed, there is a 15-second wait, 10 MB / 10 page caps, a 20-per-day rate limit that yields 429 with a reason, and explicit data-handling rules (file deleted after reading, result after 24h, URLs fetched only if public).

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 purpose and primary parameters are front-loaded in the first sentence, and nearly every following clause adds a distinct operational fact (OCR, limits, rate limit, privacy). It is dense and delivered as one long block rather than broken into digestible sentences, which costs a point.

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?

There is no output schema, so the description must describe returns itself and does: tables as rows and CSV, Label:value fields, per-page text, and `ocr_confidence` on scanned pages. Combined with timeout, size, rate-limit, and privacy details, an agent has everything needed to call it correctly.

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 100%, so structured fields already document all three parameters. The description adds workflow meaning beyond the schema by linking them ('Give `file_url` or `file_base64`; it waits up to 15 seconds and returns the result, or a `job_id` to call it again with') and restating the public-address constraint on `file_url`.

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 precise verb and resource ('get back every table as rows and as CSV, the Label: value fields ... and the text of each page') and names the accepted inputs (PDF text/scanned, image). No sibling tool overlaps with document extraction, so no differentiation is required.

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 invocation conditions: supply `file_url` or `file_base64`, use `job_id` to retrieve an earlier result, and notes that files over ~1 MB should use `file_url` or POST to /api/v1/extract. It does not state any when-not-to-use case, but there are no relevant alternative tools to route away from.

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