Skip to main content
Glama
pdf-toolkit-mcp

pdf-toolkit-mcp

by 0xmortuex

extract_tables

Read-only

Pulls tables from PDF files as Markdown or CSV, labeled by page and size; set page ranges and choose a line or text strategy for ruled or borderless tables.

Instructions

Extract tables from a PDF as markdown or CSV text, labelled with page number and size.

strategy 'lines' (default) finds tables drawn with ruling lines; use 'text' for borderless tables aligned by whitespace (less precise). Scanned PDFs have no tables to find. Output is capped at roughly max_tokens with a continue hint, like read_pdf.

pages: 1-based ranges like '2-4,9'. Limiting pages is much faster on big files.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "extract_tables"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
pagesNo
formatNomarkdown
passwordNo
strategyNolines
max_tokensNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/non-destructive/non-open-world, so the bar is lower, yet the description adds real behavior: output is truncated near max_tokens with a continue hint, and the precision tradeoff of the 'text' strategy. It doesn't mention password-protected file behavior, but otherwise discloses the traits an agent needs to predict results.

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 capability and output shape are front-loaded in the first sentence, then strategy, limitations, token cap, and page syntax follow in compact order. No filler sentences, though the 'like read_pdf' aside and the detached 'pages:' fragment slightly interrupt flow.

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?

With an output schema present, the description needn't explain return values, and it covers strategy, pagination, truncation, and a key failure mode. For a 6-parameter tool at 0% schema coverage, though, password handling and any auth/permission expectations are unaddressed, leaving a small but real gap.

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 carry parameter meaning, and it does explain strategy, pages ('1-based ranges like 2-4,9'), max_tokens capping, and format (markdown/CSV). Path and password are left to their self-evident names, and the interaction between max_tokens and the continue hint is only loosely described, so it compensates well but not fully.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: extracts tables from a PDF, with the output form (markdown or CSV text, labelled with page number and size) spelled out. It implicitly separates itself from text-reading siblings via 'like read_pdf' and from image extraction by naming tables, but it never explicitly contrasts with read_pdf or extract_pages, so it stops just short of full sibling differentiation.

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 gives concrete when-to-use guidance at the strategy level: 'lines' for ruled tables, 'text' for borderless whitespace-aligned tables and flagged as less precise. It also rules out a whole class of inputs ('Scanned PDFs have no tables to find') and advises limiting pages for speed. What's missing is guidance on choosing this tool over read_pdf or extract_pages for general text extraction.

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