Skip to main content
Glama

extract_table

Extract structured table data including headers and rows from any HTML table using a CSS selector. Converts / into column keys and cells into row dictionaries.

Instructions

Pull a into {headers, rows, row_count}. Headers come from ... if present, else the first 's cells. Each subsequent 's cells become a row dict keyed by header (or 'col_N' if no header for that column). Right tool for pricing tables, specs, finance/listings tables — saves writing the per-cell mapping eval.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector matching the <table> element
Behavior5/5

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

With no annotations, the description carries full burden and thoroughly explains the extraction logic: how headers are sourced (from thead or first th cells), how rows are mapped (keyed by header or col_N), and the return shape. This goes beyond a simple 'extract table' statement.

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?

Three concise sentences front-load the output structure, then explain header logic, and conclude with use cases. Every sentence adds value without redundancy.

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?

Given the tool's simplicity (1 param, no output schema, no annotations), the description fully explains the return structure, extraction behavior, and appropriate use cases. It covers all necessary aspects for an agent to invoke it correctly.

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 coverage is 100% with the selector parameter described as 'CSS selector matching the <table> element'. The tool description itself adds no additional meaning or constraints beyond what the schema already provides.

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 specifies the verb 'Pull' and resource 'table', details the output structure {headers, rows, row_count}, and distinguishes from generic extraction by mentioning 'saves writing per-cell mapping eval' and listing specific table types (pricing, specs, finance/listings).

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?

The description provides clear when-to-use context ('Right tool for pricing tables, specs, finance/listings tables') and implies it's simpler than eval, but does not explicitly exclude alternative tools like table_to_json or state when not to use it.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/protostatis/unbrowser'

If you have feedback or need assistance with the MCP directory API, please join our Discord server