Summarize rows
Counts rows, and sums, averages, minimums and maximums of number columns, overall and per group, in one call.
Free*
*Free up to 1,000,000 reads a month for the whole account, then $0.50 per 10,000 reads.
An example
How much work is in the workshop, per status?
Your agent callsrows_summarizeFree*
The example business is Halverson Cycle & Repair, a bike shop with a repair workshop in Portland, Oregon. The reply is the one the tool really gives.
{
"table": "Workshop jobs",
"columns": [
"Price",
"Due"
],
"group_by": "Status"
}Use it when
Someone asks for totals: how much is on order, how many per status, the latest date.
- For the rows themselves, use
rows_query.
What it does
Count rows, and sum, average, min and max number columns (min and max of dates), for the rows matching filters, overall and per value of group_by: one call instead of paging through every row. Filters work as in rows_query.
What comes back
all: the count and each measured column's sum, avg, min and max (min and max for dates); groups: the same per value of group_by, most rows first. Every reply also carries cost_usd and balance_usd.
Inputs
| Name | Type | What it is |
|---|---|---|
tableRequired | string | The table's name (or its table_id). 1 to 80 characters. |
columns | array of strings | Number or date columns to measure. Up to 10 items. |
group_by | string | A column to group the rows by. Up to 60 characters. |
filters | array of objects | Up to 20 items. |
filters[].columnRequired | string | Up to 60 characters. |
filters[].op | string | One of: eq,neq,contains,not_contains,gt,gte,lt,lte,empty,not_empty,in. |
filters[].value | any | |
match | string | One of: all,any. Default: all. |
The call
Over MCP, call rows_summarize on https://api.conecto.chat/mcp/tables. Over REST:
curl -X POST https://api.conecto.chat/v1/tools/rows_summarize \
-H "Authorization: Bearer $CONECTO_KEY" \
-H "Content-Type: application/json" \
-d '{"table":"Workshop jobs","columns":["Price","Due"],"group_by":"Status"}'When it refuses
A refused call costs nothing and says what to do next.
| Code | When | What to do |
|---|---|---|
not_found404 | No table has that name or table_id, or the table has no column of that name. | Call tables_list for the tables and their columns. |
invalid_input400 | A filter's op is unknown, compares with the wrong kind of value, or uses gt, gte, lt or lte on a column that is not a number or a date. | Use the ops this page lists, with values of the column's type. |
invalid_input400 | A measured column is not a number or date column. | Measure number or date columns; count the others with group_by. |
More Tables tools
All 12 tools- Create a table
tables_createCreates a table with typed columns: text, numbers with decimals or a currency, checkboxes, dates, choices, emails, links, phone numbers or files.$0.001 a call - List tables
tables_listEvery table with its columns and how many rows it has.Free* - Change columns
tables_change_columnsAdds, renames or removes columns; rows keep their values through a rename.$0.001 a call - Add rows
rows_addAdds up to 500 rows, each checked against its columns; if one is wrong, none is added.$0.001 per row added - Change rows
rows_updateChanges values in up to 500 rows by row number; only the columns given change, and null clears a cell.$0.001 per row changed - Add or update rows by a key
rows_upsertUpdates the rows whose key column matches and adds the rest, so a list from anywhere syncs without reading the table first.$0.001 per row added or updated - Find rows
rows_queryRows matching filters, all or any of them, sorted by up to 3 columns, a page at a time.Free* - Delete rows
rows_deleteDeletes rows by their numbers, for good.Free
Give this to your agent.
Set up Conecto from https://conecto.chat/SKILL.md