Skip to main content
Glama
sawftware-apps

DocImprint Document Intelligence

Official

Extract Tables

document.extract_tables
Read-onlyIdempotent

Extract tables and forms from PDFs or images, converting them to Markdown for easy use. Ideal for financial statements, data sheets, and structured forms.

Instructions

Extract tables and forms as Markdown from a PDF or image (base64-encoded). Use when the document contains structured tabular data such as financial statements, data sheets, or forms. For plain prose documents, use document.extract_text instead. Returns: { pages: number, text: string } — text contains Markdown-formatted tables. Example prompts:

  • "Extract the tables from this financial statement."

  • "Pull the data table from this PDF into Markdown format."

  • "Get the tabular data from this form document."

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mime_typeYesMIME type of the document. Example: "application/pdf" for PDF bank statements, "image/jpeg" for photo of a form.
document_base64YesBase64-encoded PDF or image bytes (max ~15 MB). Example: "JVBERi0xLjcNJeLjz9MNCj..." (truncated PDF base64)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
pagesYes
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the safety profile is known. The description adds value by disclosing the return format ({ pages, text } with Markdown tables) and input base64 encoding requirement, which is useful behavioral context beyond the annotations.

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 core description is concise and front-loaded, but the inclusion of three example prompts adds length. While these examples are useful, they could be trimmed without losing essential information. Overall, it remains efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple tool with clear input schema and output schema (signal indicates has output schema: true), the description is complete. It explains when to use, what to expect in the output, and provides examples, covering all necessary context.

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 100%, so the schema already documents both parameters fully. The description does not add significant parameter semantics beyond what the schema provides, such as reiterating base64 encoding but without new detail.

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 extracts tables and forms as Markdown from PDFs or images, using a specific verb and resource. It also distinguishes from sibling tool document.extract_text by noting it's for plain prose documents, providing clear differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly specifies when to use the tool: 'Use when the document contains structured tabular data such as financial statements, data sheets, or forms.' It also names the alternative tool (document.extract_text) for prose documents, giving clear usage guidance.

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/sawftware-apps/docimprint-sdk'

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