Skip to main content
Glama

PDF tables to JSON

pdf_tables_to_json
Read-onlyIdempotent

Extract every table from a PDF and return it as rows of cells in JSON, with the page number of each table. Use when you need numbers from financial statements, invoices, price lists or reports that are locked in a PDF. Send {url} or {base64}. Max 20 MB, first 50 pages. Returns {pages, tables:[{page, rows}], truncated}. Errors: 400 not a PDF, 413 too large. Price: $0.01 USDC per call (x402).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPublic URL of the file. Provide url OR base64.
base64NoFile contents, base64-encoded (max 20 MB). Provide url OR base64.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds operational constraints well beyond them: 'Max 20 MB, first 50 pages', a truncation flag, explicit error codes (400 not a PDF, 413 too large), and a per-call price with the x402 payment scheme. That is exactly the extra context agents need before invoking.

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?

Front-loads purpose, then constraints, then return shape and errors in a tight sequence with no filler sentences. Slight redundancy between the schema's param descriptions and 'Send {url} or {base64}' costs a point.

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, and the description supplies the return shape ({pages, tables:[{page, rows}], truncated}), limits, error behavior, and payment requirements. An agent has everything needed to call and interpret the result.

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% and both parameters already document the url-OR-base64 mutual exclusivity, so the baseline applies. The description's 'Send {url} or {base64}' largely repeats the schema, though the 20 MB limit for base64 adds a small amount of binding.

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 precise verb+resource ('Extract every table from a PDF ... as rows of cells in JSON') and adds the returned granularity ('with the page number of each table'). This clearly separates it from siblings like ocr_read_text (raw text) and convert_file (format conversion).

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?

Gives a concrete when-to-use context ('numbers from financial statements, invoices, price lists or reports that are locked in a PDF'), which is more specific than most. It stops short of naming alternatives or exclusions, e.g. when to prefer ocr_read_text for scanned PDFs, so it is clear-but-not-routing.

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