Aggregate sheet
aggregate_sheetGroups spreadsheet rows by chosen columns and calculates sums, means, counts, or other metrics per group, returning one summary record per group.
Instructions
Group rows and compute totals per group (e.g. sum of Amount by Region). Returns one record per group.
Use for summaries of a table; to list individual matching rows use query_sheet.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sheet": "<sheet>",
"group_by": "<group_by>",
"agg": "<agg>"
},
"name": "aggregate_sheet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agg | Yes | Header name -> function: sum, mean, min, max, count, median, nunique, first or last. E.g. {"Amount": "sum"}. | |
| path | No | File path or preloaded name (list_configured_files). Omit if only one file is preloaded. | |
| sheet | Yes | Sheet name (case-sensitive). | |
| group_by | Yes | Header names to group by, e.g. ["Region"]. | |
| cell_range | No | Range to read, e.g. "A1:F500". Omit for the whole sheet. | |
| has_header | No | First row holds column names. When false, columns are named col_0, col_1, ... |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||