Skip to main content
Glama

extract_table

Read-onlyIdempotent

Read real HTML table markup as JSON, using header cells as keys and each row as an object. Filter rows server-side to return only matching data, not the entire table.

Instructions

Read a real as JSON: thead cells become keys, each row an object. Only for tabular markup — where filters rows server-side, so one matching row out of 1500 costs a few hundred bytes instead of the whole document. row_count is the table total, match_count how many rows passed the filter. No table at index is an error saying how many the selector found; for cards and lists use extract.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexNoWhich table to take when the selector matches several, 0-based
whereNo{column: substring} rows must match, case-insensitive (names too). Key "any" matches any cell.
offsetNoSkip N rows of the (filtered) set before applying max_rows.
tab_idNoTarget tab; omitted = last tab navigated in this session, else the active one
columnsNoReturn only these columns per row.
max_rowsNoMax rows returned to you (output cap).
selectorNoThe table to read; ">>>" pierces shadow DOMtable
scan_rowsNoMax rows materialized in-page to scan/filter; raise for very large tables.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.28.0
    • changedInput schema / properties / where / description
      Previous value: -"{column: substring} rows must match, case-insensitive contains. Key \"any\" matches any cell."New value: +"{column: substring} rows must match, case-insensitive (names too). Key \"any\" matches any cell."
  2. Changed4 schema fields changedv1.10.0
    • addedInput schema / properties / index / description
      Added value: +"Which table to take when the selector matches several, 0-based"
    • addedInput schema / properties / selector / description
      Added value: +"The table to read; \">>>\" pierces shadow DOM"
    • addedInput schema / properties / tab_id / description
      Added value: +"Target tab; omitted = last tab navigated in this session, else the active one"
    • changedInput schema / properties / where / description
      Previous value: -"Keep only rows where each {column: substring} matches (case-insensitive contains). Use key \"any\" (or when the table has no headers) to match against any cell."New value: +"{column: substring} rows must match, case-insensitive contains. Key \"any\" matches any cell."
  3. First observedv1.8.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare a safe read (readOnlyHint, idempotentHint, destructiveHint=false), yet the description adds substantive behavior: `where` filters server-side with an explicit cost example (one row out of 1500 costs a few hundred bytes), the meaning of `row_count` vs `match_count` in the response, and the error behavior when no table matches the index. This is rich context beyond the structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four dense sentences, front-loaded with the purpose and output shape, then usage, then return semantics, then error behavior. Every sentence carries information an agent needs; nothing is padding.

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?

There is no output schema, so the description correctly carries the return-value burden (thead→keys, row objects, row_count/match_count) plus the error contract. With 8 parameters (all optional, 100% schema coverage) and annotations covering safety, the description is complete enough for correct invocation.

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 description coverage is 100%, so the baseline is 3, but the description earns extra credit by framing `where` as server-side filtering with a cost rationale and by explaining that a missing table at `index` yields an error reporting the selector's match count. It adds meaning beyond the schema's terse 'rows must match' wording.

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?

The description states a precise verb and resource ('Read a real <table> as JSON') and immediately explains the output shape (thead cells become keys, each row an object). It explicitly distinguishes itself from the sibling 'extract' ('for cards and lists use extract'), so an agent can route correctly without opening either 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?

It states the scope condition ('Only for tabular markup') and names the alternative for the excluded case ('for cards and lists use extract'), which is exactly the when-to-use/when-not guidance needed. The server-side filtering note further clarifies the intended use for large tables.

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