TablesRead-only

Query table rows

query_table_rows

Read rows from a table: a filter tree (and / or / not over field clauses, one hop through a relation allowed), text search, sort, a saved view, a keyset-paginated row page, group headers with counts, and calculations (sum, avg, count, min, max, …) over the whole filtered set — all answered over the SAME rows, so a total beside a page is a total of that page’s set. Each row comes back as typed properties keyed by field key: select options carry their labels, related rows and files come back as counted items, and a computed property carries a `stale` flag when a recomputation is outstanding. Pass rows: false for totals only. A question the schema cannot answer is refused with the offending path named.

Parameters

ParameterTypeRequiredDescription
tableIdstringrequiredTable ID — get from list_tables
filterunknownoptionalFilter tree. A clause is { field, op, value } where field is a field KEY (or one hop through a relation as "relation.field") and op is one of eq, neq, gt, gte, lt, lte, in, nin, contains, starts_with, ends_with, between, is_null, is_not_null. Combine with { logic: "and" | "or", conditions: [...] } or { logic: "not", condition }. A select field compares by option id; a date takes "YYYY-MM-DD", a range { start, end }, or a relative preset { rel: "this_month" }.
searchstringoptionalCase-insensitive match over the primary field and text fields
viewIdstringoptionalAnswer within a saved view: its filter is merged in and its sort used when none is given
sortobject[]optionalSort order as [{ field, direction }] (default: the promoted date field, then row id)
fieldsstring[]optionalField keys to return; omit for every field
deletedbooleanoptionalRead the trash instead of live rows
rowsboolean | objectoptionalThe row page: { cursor?, limit? } (max 500), or false to skip rows and answer groups / calculations only
groupsobjectoptionalGroup headers with counts and per-group calculations over the filtered set
calculationsobjectoptionalCalculations over the WHOLE filtered set by field key, e.g. { amount: "sum", date: "max" }. Values: count_all, count_values, count_empty, count_unique, percent_empty, percent_filled, sum, avg, median, min, max, range, earliest, latest, date_range.

Example call

The tool call an MCP client sends (required arguments shown with placeholder values).

{
"tool": "query_table_rows",
"arguments": {
"tableId": "tableId_123"
}
}

Use this tool in

Related Tables tools