Skip to main content
Glama

Extract Document Tables

extract_document_tables

Extract tables from PDF, DOCX, text, markdown, CSV, JSON, or HTML documents and write them to a single JSON file. Supports local file paths or URLs.

Instructions

Convert a PDF, DOCX, text, markdown, CSV, JSON, or HTML document into table data and write one JSON output file. The source can be a local file path or an HTTP/HTTPS URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdNoOptional stable identifier for the document in the generated JSON.
outputPathNoOptional path for the single generated JSON file.
sourcePathYesPath to the source document on the local filesystem, or an HTTP/HTTPS URL (e.g. a raw GitHub link to a .md or .txt file).
maxChunkCharactersNoOptional maximum characters sent to the AI model per chunk.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
outputPathYes
sourcePathYes
tableCountYes
Behavior3/5

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

No annotations are provided, so the description must fully disclose behavior. It does state that the tool writes one JSON output file, making the side effect explicit. However, it omits details such as whether existing files are overwritten, whether directories are created, or what happens if no tables are found. The chunking behavior implied by the maxChunkCharacters parameter is also not explained, leaving some ambiguity in the tool's execution.

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 long, with no filler. It front-loads the primary action ('Convert...'), then adds source flexibility. Every word contributes to understanding the tool's purpose and capabilities, making it an exemplary concise description.

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?

The description covers the core purpose, input formats, and output behavior, and an output schema exists to explain return values. It lacks a note about chunking or AI model usage, which is relevant given the maxChunkCharacters parameter. However, for a tool with a clear scope and no siblings, it is largely complete and sufficient for an agent to select and invoke it.

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

Parameters4/5

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

The schema already provides descriptions for all four parameters, giving a baseline of 3. The description adds value by explicitly listing the supported document formats (PDF, DOCX, text, markdown, CSV, JSON, HTML), which is more informative than the schema's example of .md and .txt. This enhances understanding of the sourcePath parameter beyond the schema text.

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: converting a document into table data and writing a JSON output file. It enumerates supported input formats and source types, making the purpose specific and unambiguous. There are no sibling tools to conflict with, so the description successfully communicates what the tool does.

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 context on when to use the tool: when a document (of supported formats) needs to be converted to tabular JSON. It mentions both local file paths and URLs, giving concrete usage scenarios. Since there are no sibling tools, explicit alternatives are unnecessary, but the description could have hinted at intended use cases or limitations (e.g., not for images).

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/faisalkcmvp/spec-forge-mcp'

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