Skip to main content
Glama

table_to_json

Extract any HTML table into a JSON object with headers, rows, and row count. Defaults to the first table on the page.

Instructions

Alias for extract_table with a first-table default. Pulls a table into {headers, rows, row_count}; selector defaults to 'table'. Use this when an agent expects a table-to-JSON convenience tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorNoOptional CSS selector matching the <table> element (default: table)
Behavior4/5

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

No annotations are given, so the description carries full burden. It discloses the default selector, the output structure (headers, rows, row_count), and that it's an alias. It does not mention error handling or behavior when no table is found, but for a simple extraction, it's sufficiently transparent.

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?

Two sentences, no redundancy, front-loaded with key information. Every word earns its place.

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 optional param, no output schema), the description covers the purpose, default behavior, and output format completely. No gaps remain.

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 the selector parameter well-described. The description adds little beyond stating the default, which is already in the schema. 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?

The description clearly states it's an alias for extract_table with a default selector, and specifies the output format {headers, rows, row_count}. It distinguishes itself from the sibling extract_table by positioning as a convenience tool.

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 advises using this tool when an agent expects a table-to-JSON convenience tool, implying that for more control or different defaults, one should use extract_table. This provides clear context, though it lacks an explicit 'when not to use' statement.

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