Skip to main content
Glama

Ask a question about a table

ask_table
Read-onlyIdempotent

Answer a plain-English question about a table of rows (up to 5,000): filters ("open jobs in Leeds due this week", "accounts with no rep"), place questions ("customers within 5 miles of Manchester", "sites with 3+ pharmacies within 1 km", "in a flood zone", "high crime areas"), ranking, counts and group-bys ("homes by agent", "average price by area"), and two-list questions with reference_records ("customers within 10 km of any depot in the reference list"). Deterministic: the question is read into rules and tools, never answered by a model making up values, and reading says exactly how it was read. The first 200 matching rows come back in mode rows; past that use mode match. A zero result comes with a diagnosis (which part emptied it and the nearest non-empty reading). mode rows (default) returns the matching rows; match returns one TRUE/FALSE per input row in order (best for big tables: join it back in your own code); why returns the reading. Rows without lat/lng are placed from an address column when the question needs places. Place tools (nearby, crime, busy) cover the UK; flood covers England and the US.

Input Schema

NameRequiredDescriptionDefault
modeNorows
rowsNo…and the rows as arrays in the same order.
sourceNoInstead of typing rows: { sheet: "<Google Sheets link>", tab?: "Sites" } (shared with the InstaMaps service account, or viewable by anyone with the link), { file: "<Drive link to a CSV or Excel file>" }, or { run: "<run_id from an earlier answer>" }. Columns are found by their headers (id, name, address or its parts, lat/lng); name them if they aren't obvious (id_column, address_column, lat_column, lng_column; from_column and to_column for road distances). Rows with coordinates are used as they are.
headersNoOr the column names…
recordsNoThe table as row objects (keys are the column names).
questionYesThe question, as a person would ask it.
reference_recordsNoOptional second list for two-list questions (depots, competitors, stores).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnly/openWorld/idempotent annotations, it discloses determinism (rules and tools, never model-invented values), that `reading` explains how the question was interpreted, the 200-row cap and mode tradeoffs, that zero results come with a diagnosis, address-based geocoding fallback, and geographic coverage limits. This is exactly the behavioural context an agent needs before calling.

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?

Front-loaded with the core purpose and constraint, and nearly every clause carries information. It is dense to the point of being run-on, with long parenthetical example lists that slow scanning, so it is efficient but not maximally tight.

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?

For a 7-parameter tool with nested source objects and no output schema, it covers modes, return shape (rows vs match vector vs reading), size limits, zero-result behaviour and geo scope well. It stops short of describing the shape of the `reading` or diagnosis output, which is the one remaining gap.

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 coverage is already 86%, but the description adds real meaning the schema lacks, notably explaining each mode value (rows returns matching rows, match returns one TRUE/FALSE per input row in order, why returns the reading) which the bare enum does not, plus the 5,000-row limit and the intent of reference_records.

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?

States a specific verb and resource (answer a plain-English question about a table of rows) and scopes it concretely with examples of filters, place questions, ranking, counts/group-bys and two-list questions. It is clearly distinguishable from siblings like filter_by_location or find_nearby, which are shape-based lookups rather than free-text question answering.

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?

Gives explicit operating guidance: use mode rows for the first 200 matches and mode match for larger tables, use reference_records for two-list questions, and place tools are UK-only with flood being England/US. It does not, however, name sibling tools to use instead of this one, so the routing guidance is present but not framed as alternatives.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources