Skip to main content
Glama
pdf4me
by pdf4me

extract_table_from_pdf

Extract tables from PDF files and save them as JSON, CSV, or per-table files for further data processing. Converts PDF tables into structured data files.

Instructions

Extract tables from a PDF via PDF4me ExtractTableFromPdf (/api/v2/ExtractTableFromPdf). pdf_file_path; optional output_dir (defaults next to PDF). Saves extracted_tables.json, per-table table_N.json, and table_N.csv when rows are available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
output_dirNo
pdf_file_pathYes
request_doc_nameNo
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the output artifacts (extracted_tables.json, table_N.json, table_N.csv) and the default output directory behavior (defaults next to PDF), which gives useful clarity. It doesn't mention failure modes or whether the original PDF is modified, but the extraction scope is clear.

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?

Two sentences deliver the purpose, API endpoint, key parameters, and output files with no redundant or vague wording. Every clause adds value, making it extremely efficient.

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 covers the core purpose and output behavior, but it fails to explain one input parameter (request_doc_name) and offers no usage guidance relative to sibling tools. Given no output schema and no annotations, the description is functional but not fully complete for an agent deciding whether to use it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains pdf_file_path and output_dir (including its default behavior), but omits request_doc_name entirely. The third parameter is completely unexplained, leaving a significant gap for an agent trying to invoke the tool with all parameters correctly.

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 states a specific verb+resource: 'Extract tables from a PDF' and even names the underlying API endpoint (ExtractTableFromPdf). This clearly distinguishes it from sibling tools such as extract_text_from_pdf or convert_pdf_to_excel, which have different purposes.

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 use case is implied by the name and description (extracting tables from PDFs), but there is no explicit guidance on when to choose this over alternatives like convert_pdf_to_excel or extract_text_by_expression. No when-not-to-use or alternative tool references are provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pdf4me/pdf4me-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server