Skip to main content
Glama

Extract Tables from PDF

extract_tables

Detect and reconstruct tables from a text-based PDF. Returns each table as structured rows plus ready-to-use markdown and CSV renderings. Works best on PDFs with clear columnar layout (invoices, reports, statements).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_urlNoPublic http(s) URL of the file
file_base64NoBase64-encoded file contents (data-URI prefix allowed)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool requires a text-based PDF, implies limitations with non-clear layouts, and explicitly states the output format (structured rows plus markdown and CSV). This is useful behavioral context, though it does not cover failure modes or exact row structure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core action, followed by output details and best-use case. Every sentence provides value, with no redundant or vague phrasing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description lacks details on the exact structured row format (e.g., array of objects, column names) and behavior when no tables are found or when tables span multiple pages. Since there is no output schema, the description should compensate more fully, but it does cover the essential output types and limitation, making it minimally adequate.

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 coverage is 100% with both file_url and file_base64 having descriptions. The tool description itself adds no new parameter semantics, so the baseline of 3 is appropriate as the schema already documents the parameters.

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?

The description clearly states the tool's function: detecting and reconstructing tables from a PDF, with a specific verb and resource. It differentiates from sibling tools like pdf_to_markdown by emphasizing structured rows and CSV output, and from ocr_image by explicitly targeting text-based PDFs.

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?

The description provides clear usage context by specifying it works best on text-based PDFs with clear columnar layouts, and gives examples (invoices, reports, statements). It does not explicitly mention when not to use or name alternatives, but the context is strong enough for an agent to infer appropriate usage.

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.

TDQS

A4.1/5.0
Disambiguation5/5

Each tool targets a distinct document processing task: table extraction, image OCR, invoice parsing, PDF-to-markdown conversion, and markdown-to-PDF rendering. Even though parse_invoice can process images, its structured output clearly differentiates it from ocr_image.

Naming Consistency4/5

Four tools follow a clear verb_noun pattern (extract_tables, ocr_image, parse_invoice, render_pdf). However, pdf_to_markdown breaks the pattern by using a source_to_target format instead of a verb-first name, creating a minor inconsistency.

Tool Count5/5

Five tools is a well-scoped count for a document processing server. Each tool serves a distinct purpose without redundancy, covering input (PDF, image), processing (extraction, OCR, parsing), and output (markdown, PDF).

Completeness4/5

The toolkit covers a coherent document workflow: extract text/tables from PDFs, OCR images, parse invoices, convert to markdown, and generate PDFs. A minor gap is the lack of direct scanned-PDF handling (requires manual page-to-image conversion), but this is workable around.

Resources