Skip to main content
Glama

extract_tables

Read-onlyIdempotent

Extracts table-like structures from PDFs, CSVs, and text files by detecting pipe-, tab-, or multi-space-delimited columns, returning structured tabular data for analysis. Read-only.

Instructions

Extract table-like structures from a document, detecting pipe-delimited, tab-delimited, and multi-space-delimited columns. Use this when you need structured tabular data from a PDF, CSV, or text file. Read-only.

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": {
      "filename": "<filename>"
    },
    "name": "extract_tables"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoOptional page number for PDFs (1-based). If omitted, extracts from all pages.
filenameYesThe document filename to extract tables from

Output Schema

NameRequiredDescriptionDefault
tablesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.4.1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "tables": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "page": {
      +            "type": "integer"
      +          },
      +          "rows": {
      +            "items": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": [
      +                "null",
      +                "array"
      +              ]
      +            },
      +            "type": [
      +              "null",
      +              "array"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "page",
      +          "rows"
      +        ],
      +        "type": "object"
      +      },
      +      "type": [
      +        "null",
      +        "array"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "tables"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the trailing 'Read-only.' sentence merely restates structured data and earns no credit. Beyond that, the description adds genuine behavioral value by disclosing the delimiter-detection approach, but says nothing about extraction limits, accuracy on malformed tables, or multi-table output handling.

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?

Three short sentences with the core capability front-loaded and no digression. The closing 'Read-only.' is redundant given the annotations, costing a small amount of signal-to-noise.

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

Completeness4/5

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

With an output schema present, a fully described two-parameter schema, and rich annotations, the description covers purpose, supported inputs, and detection behavior adequately. Only the competitive positioning against convert_to_markdown and read_document 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 100%, with both 'filename' and 'page' documented including the 1-based and all-pages fallback behavior. The description adds no parameter detail beyond the schema, so the baseline of 3 applies.

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 names a specific verb and resource ('Extract table-like structures from a document') and enumerates the detection heuristics (pipe, tab, multi-space delimited), which tells an agent exactly what this tool returns. It stops short of naming a sibling such as read_document or convert_to_markdown, so the boundary with those tools is left implicit.

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?

'Use this when you need structured tabular data from a PDF, CSV, or text file' gives a positive use condition and names supported file types. However, it offers no exclusions or alternatives, even though siblings like convert_to_markdown and read_document could plausibly surface tabular content, leaving the routing decision to inference.

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