Skip to main content
Glama

extract_pdf_tables

Read-onlyIdempotent

Extract structured tables from PDFs and get them as Markdown, CSV, or JSON. Preserves page numbers and dimensions for financial statements, spec sheets, and price lists.

Instructions

Extract data tables from a PDF with structure preserved — returns each table's page number, dimensions and content as Markdown, CSV or JSON rows. Ideal for financial statements, spec sheets, price lists and any document where tables matter more than prose. Scans up to 100 pages per call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPublic http(s) URL of the document to fetch and convert. Leave empty when passing file_base64 instead.
pagesNo1-based page selection like '1,3-5'. Empty means all pages.
formatNoOutput format for each table: 'markdown' (default), 'csv' or 'json'.markdown
filenameNoOriginal filename with extension (e.g. 'report.docx'). Used as a format hint when content type cannot be detected automatically.
passwordNoPassword for encrypted PDFs. Empty for normal files.
max_tablesNoMaximum number of tables to return (default 50).
file_base64NoBase64-encoded file content (for documents not reachable by URL). Decoded size limit: 30 MB. Leave empty when passing url instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover read-only/idempotent/non-destructive safety, so the burden is lower. The description adds genuinely useful behavior: the 100-page-per-call limit and the structured return shape (page number, dimensions, content). This goes beyond what annotations provide without contradicting them.

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?

Three sentences with no filler: the primary action is front-loaded, output details follow, then use-case guidance and a key limit. Every sentence adds information needed for correct tool selection and invocation.

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?

Given the absence of an output schema, the description competently explains what is returned and the scan limit. It does not explicitly state that either url or file_base64 is required, but the schema descriptions cover that. Overall it is sufficient for correct use without being exhaustive.

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 the schema already documents all 7 parameters well. The description mentions Markdown/CSV/JSON and table content, but does not add parameter-specific semantics beyond what the input schema already states. Baseline 3 is appropriate.

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 opens with a specific verb and resource ('Extract data tables from a PDF') and clearly defines the delivered artifacts (page number, dimensions, content in Markdown/CSV/JSON). It also differentiates from sibling conversion tools by emphasizing tables over prose, so an agent can distinguish it from convert_pdf_to_markdown or read_pdf_pages.

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 gives clear context for when to use the tool: 'Ideal for financial statements, spec sheets, price lists and any document where tables matter more than prose.' It implies when the tool is appropriate, though it does not explicitly name alternatives or state when not to use it, so it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.