Skip to main content
Glama

extract_table

Extract tables from PDFs with cross-page merge and configurable export (JSON, CSV, XLSX) to convert documents into structured data for analysis.

Instructions

extract_table tool:表格抽取(跨页 + 大表分层,M4,T04)。

Args: pdf_path: PDF 路径(必填)。 pages: 页号(int | list[int] | None;1-based)。 cross_page: 是否跨页合并(bool,默认 true)。 format: 导出格式(str | list[str];json/csv/xlsx 多选;默认 "json")。 render: 是否渲染页图(bool,默认 true)。

Returns: 结构化 JSON 文本(tables.json 汇总)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagesNo
formatNojson
renderNo
pdf_pathYes
cross_pageNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the behavioral burden. It discloses cross-page merging, large-table layering, optional page-image rendering, and a structured JSON return. However, it leaves side effects ambiguous (e.g., whether csv/xlsx exports write files) and includes the unexplained 'M4,T04' tag.

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 Args/Returns layout is scannable and every parameter line provides useful semantics. The 'M4,T04' tag is unexplained and adds minor noise, but the structure remains efficient and readable.

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?

All parameters are documented, and an output schema exists, so the return-value shape is not a critical gap. The main missing context is explicit selection guidance relative to sibling tools and clarification of how non-JSON export formats are handled.

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

Parameters5/5

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

Schema description coverage is 0%, and the description fully compensates by adding types, defaults, requiredness, 1-based page numbering, accepted format values, and rendering meaning for all five parameters. This is essential detail that goes well beyond the sparse input schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly names the operation as table extraction from a PDF and mentions cross-page merging and large-table layering, which adds useful specificity. It does not explicitly contrast the tool with siblings like parse_text or extract_formulas, but the intent is unambiguous.

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 use for PDF table extraction, especially across pages or with large tables, but it never states when to prefer this tool over alternatives such as vision_extract, dual_extract, or extract_formulas. There are no explicit when-not-to-use conditions or alternative recommendations.

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