Skip to main content
Glama
ESPChong

context-retrieval

by ESPChong

extract_document_tables

Extract tables from PDF documents and get structured JSON with rows, columns, and CSV per table. Uses lattice/stream detection with automatic fallback to handle varied table layouts.

Instructions

Extract tabular data from a PDF (Camelot lattice/stream with a PyMuPDF fallback; flavor='auto' picks the first strategy that finds tables). Returns JSON with rows, columns and CSV per table.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagesNo
flavorNoauto
pdf_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries full behavioral burden. It discloses the multi-strategy pipeline (Camelot lattice/stream with PyMuPDF fallback), explains what flavor='auto' does, and explicitly states the return structure (rows, columns, CSV per table). It does not discuss failure modes, but it provides meaningful behavioral context beyond the schema.

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, front-loaded with the primary action, and every clause adds useful information. No redundant filler or restating of the tool name.

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 extraction strategy and output format, and an output schema is present so return details are already structurally defined. The main gap is that the pages parameter behavior remains unspecified, and there is no guidance on what happens when no tables are found. Sufficient for default usage but incomplete for full parameter-level decision-making.

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 0%, so the description must compensate for all three parameters. It clearly explains flavor's behavior and pdf_path is self-evident from the tool's purpose. However, pages is entirely undocumented: there is no hint that it expects a string like '1-3,5' or what passing null means. Partial compensation, not full.

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 opening verb phrase 'Extract tabular data from a PDF' is specific, names the resource (PDF) and the exact kind of content (tabular data), and is immediately distinguishable from siblings like extract_document_text and extract_document_images. The added method/return mentions reinforce rather than obscure purpose.

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 when to use it: whenever the agent needs tabular data from a PDF. However, it never explicitly contrasts with extract_document_text or extract_document_images, nor gives exclusion criteria (e.g., use extract_document_text for non-tabular content). The usage context is clear but the alternative-selection guidance is left to inference.

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

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/ESPChong/context-retrieval-system-RAG-MCP'

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