Skip to main content
Glama

Export a table to Excel

export_table
Idempotent

Convert a table from one PDF page into an .xlsx workbook and preview the rows. Detects lined tables automatically, or reads a set area, with amounts stored as numbers.

Instructions

Reads the table on one page of a PDF and writes it as an .xlsx workbook, and returns the rows found as a preview. Without an area, a table drawn with lines is found by itself; otherwise the whole page is read. Rows and columns follow the table's lines when it has them; amounts (1.234,56 or 1,234.56) become numbers, codes and dates stay text. Use it for tables you want to calculate with; for plain text use extract_text. Scanned pages need recognize_text first; a page without text is an error. The original is not changed, and an existing output file is only replaced with overwrite: true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
areaNoOptional area in points from the page's top-left corner.
pageYesPage number (1-based).
pathYesAbsolute path of the PDF.
outputYesAbsolute path of the .xlsx file to write.
passwordNoPassword, if the PDF is encrypted. Without it an encrypted PDF cannot be opened; with it, it can be read, but tools that write a new PDF cannot save it.
overwriteNoAllow replacing an existing file (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.9
    • changedInput schema / properties / password / description
      Previous value: -"Password, if the PDF is encrypted."New value: +"Password, if the PDF is encrypted. Without it an encrypted PDF cannot be opened; with it, it can be read, but tools that write a new PDF cannot save it."
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only give coarse hints (readOnlyHint=false, destructiveHint=false, idempotentHint=true); the description adds real specifics beyond them: the original file is untouched, an existing output is only replaced when overwrite is true, line-less pages fall back to whole-page reading, a text-less page is an error, and numeric parsing rules. These are consistent with, not contradictory to, 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?

Purpose and output artifact are front-loaded in the first clause, and every subsequent sentence carries distinct information (fallback behavior, parsing rules, prerequisites, safety). It is dense and somewhat packed with semicolon-joined clauses, but no sentence is filler.

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?

No output schema exists, yet the description covers the return value ('returns the rows found as a preview'), the failure mode, prerequisites, and file-safety behavior. For a 6-parameter write tool with nested area and an encrypted-PDF caveat, nothing an agent needs to invoke it correctly is missing.

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?

Schema coverage is 100%, so the schema already documents area, page, path, output, password, and overwrite, making 3 the baseline. The description adds behavioral meaning for area (auto-detection of a lined table vs whole-page reading when omitted) and for overwrite, which goes beyond the structured field 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?

States a specific verb and resource ('reads the table on one page of a PDF') plus the concrete artifact produced ('writes it as an .xlsx workbook'), and explicitly differentiates itself from extract_text. An agent can distinguish it from extract_text, pdf_to_images, and get_pdf_info without opening any schema.

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?

Gives an explicit selection rule ('Use it for tables you want to calculate with; for plain text use extract_text') and a prerequisite ('Scanned pages need recognize_text first'). Both the when-to-use and the when-not-to-use cases are named.

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