Skip to main content
Glama

search_tables

Find rows in HTML/Markdown tables by substring or regex, optionally scoped to a table or column, and get row indices plus version hashes to enable precise follow-up edits.

Instructions

Search for rows matching a value across one or all tables in a file.

Returns matching rows with table index, row index, and version hash so you can immediately follow up with a write tool. Prefer this over grep for table data — it understands column structure and handles HTML tables.

Two search modes (regex overrides pattern if both given):

  • pattern: case-insensitive substring match (simple, no escaping needed)

  • regex: full regex via re.search (e.g. D 1\.\d+ for sub-items)

If neither pattern nor regex is provided, returns all rows.

Args: file_path: Absolute path to the Markdown file. pattern: Case-insensitive substring to match in cell values. regex: Regular expression to match in cell values (overrides pattern). table_index: Search a specific table (0-based), or -1 for all tables. column: Restrict search to a column (letter, name, or composite). Empty string searches all columns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regexNo
columnNo
patternNo
file_pathYes
table_indexNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden, and it delivers: it discloses the two search modes, the precedence rule ('regex overrides pattern'), case-insensitive behavior, the all-rows fallback, and the returned fields including version hash for follow-up writes.

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?

The description is detailed but well-organized into purpose, return value, usage guidance, mode semantics, and parameter explanations. Every sentence adds functional value, and the most important behavior is front-loaded.

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 five parameters, no output schema, and no annotations, this description is remarkably complete. It explains what the tool returns, how modes interact, what each parameter means, and when to use the tool, leaving no critical gap for an agent to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the detailed Args section is essential. It adds real meaning beyond the schema: 'Absolute path to the Markdown file,' '0-based' table indexing, and 'letter, name, or composite' for column selection.

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 starts with a precise verb and resource: 'Search for rows matching a value across one or all tables in a file.' It further clarifies the return payload (matching rows with table index, row index, version hash), making it easy to distinguish from sibling read/write tools.

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 gives clear usage context: 'Prefer this over grep for table data — it understands column structure and handles HTML tables' and explains how it fits into a write workflow. It explicitly names grep as an alternative, though it does not directly compare itself to sibling tools like read_table.

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