Skip to main content
Glama

Extract Tables From Document

document_tables
Read-onlyIdempotent

Reconstruct every table in a document image into headers and rows.

Returns: dict with keys: table_count (int), tables (list of {title, headers, rows, row_count, column_count}); [] if there are no tables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYesBase64-encoded PNG/JPEG of the document page

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already mark the operation read-only/idempotent, and the description adds useful behavioral detail: the exact return keys (table_count, tables), table objects (title, headers, rows, row_count, column_count), and the explicit empty-list behavior for documents without tables. It stops short of mentioning failure modes or OCR limitations.

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 compact sentences plus a structured Returns list. The purpose is front-loaded and every sentence contributes: first defines operation, second defines return contract. No filler.

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 there is no output schema, the description compensates by defining the return dict and the no-table case. It also benefits from annotations covering read-only and idempotency. A minor gap is the absence of error/limitation notes, but the tool is simple enough that the essential contract is present.

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 coverage is 100%, with the image parameter thoroughly described as 'Base64-encoded PNG/JPEG of the document page.' The description only reinforces that the input is a document image, adding no new parameter-level meaning beyond the schema.

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 uses the specific verb 'Reconstruct' with the resource 'every table in a document image' and spells out the deliverable 'headers and rows,' which clearly distinguishes this from sibling extraction tools like document_extract or document_to_markdown by focusing on tabular structure.

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?

It clearly states the context: use on document images when you need table structure ('every table ... into headers and rows'). It doesn't explicitly discuss when not to use it or name alternatives, but the single-purpose scope and siblings make the use case apparent.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.7/5.0
Disambiguation4/5

Most tools are clearly distinct: document_* handle document analysis, while image tools (remove_background, restore_face, upscale_image) are unambiguous. However, document_extract and understand_content both perform field extraction from documents, differing mainly in schema flexibility, which could cause misselection. run_skillsets also overlaps conceptually as a pipeline tool.

Naming Consistency3/5

Naming is partially consistent: image tools follow a verb_noun pattern (remove_background, restore_face, upscale_image), and document tools share a 'document_' prefix. However, the document tools mix noun_verb (document_extract, document_query) with noun_noun (document_tables) and document_to_markdown deviates with a preposition. This mixed convention reduces predictability.

Tool Count5/5

With 10 tools, the count is well within the ideal 3-15 range. Each tool addresses a meaningful capability, from document parsing to image enhancement, without feeling redundant or excessive. The scope is appropriate for a multi-purpose image/document API.

Completeness4/5

The surface covers core workflows: document structuring (extract, markdown, tables, query), image enhancement (upscale, background removal, face restore), and health checks. Minor gaps include lack of explicit image format conversion or document deletion, but these are not essential for the stated purpose. Overall, the tools form a coherent set with no obvious dead ends.

Resources