Skip to main content
Glama

PDF table extraction

pdf_tables
Read-onlyIdempotent

Extract tables (rows and header-keyed records) from a PDF given by public URL or base64 (max 4 MiB, 30 pages). 'lines' strategy for ruled tables, 'text' for whitespace-aligned ones. Price: 0.04 USDC per successful call on Base via x402 (pass the signed payment in _meta['x402/payment']; failed calls are not charged). HTTP equivalent: POST https://json-canon-x402.fly.dev/v1/pdf-tables.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "pdf_tables"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoPublic http(s) URL of the PDF (max 4 MiB, 3 redirects, public IPs only).
pagesNo1-based pages to read. Default: all (up to max_pages).
headerNoAlso return rows as records keyed by the first row.
strategyNo'lines' for ruled tables, 'text' for whitespace-aligned columns.lines
max_pagesNo
pdf_base64NoAlternative to 'url': base64 PDF bytes (max 4 MiB decoded).
include_textNoAlso return page text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already declare it read-only, idempotent and non-destructive, but the description goes well beyond them: hard limits (4 MiB, 30 pages), a per-call price of 0.04 USDC on Base via x402, the exact location of the signed payment in _meta['x402/payment'], and the fact that failed calls are not charged. That payment contract is essential operational context an agent cannot infer from 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 description is dense but front-loaded: purpose first, then strategy choice, then pricing/payment, then the HTTP equivalent. Every clause carries information, though the pricing and endpoint details make it longer than a purely functional summary.

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?

With no output schema, the description still tells the agent what comes back (rows plus header-keyed records, optional page text), what constraints apply, and how payment is handled. For a read-only extraction tool with 86% schema coverage, nothing needed to call it correctly is missing.

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 86%, so the schema already explains url, pages, header, strategy, max_pages, pdf_base64 and include_text in detail. The description's phrase 'header-keyed records' adds a little framing for the header flag, but otherwise restates the strategy and size limits — baseline 3 is appropriate.

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 — extracting tables (rows and header-keyed records) from a PDF — plus the two accepted input forms (public URL or base64). This cleanly separates it from the pdf_text sibling, which handles raw text rather than tables.

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

Usage Guidelines3/5

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

It gives strategy-selection guidance ('lines' for ruled tables, 'text' for whitespace-aligned), which tells the agent how to call it well. But it never says when to prefer this over pdf_text or what to do when a PDF has no tables, so the when-to-use versus alternatives is only implied.

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.

Resources