Aggregate dataset
aggregate_datasetCount rows or calculate sum, average, min, or max for numeric fields, optionally grouped and filtered, to answer questions such as totals per district or average students.
Instructions
Count rows or compute sum/avg/min/max of a numeric field, optionally per group.
Answers questions like "how many schools per district" (group_by="name", metric="count") or "average number of students" (metric="avg", metric_field="name6"). Values stored as text ("1 219", "12,5") are parsed as numbers; non-numeric values are skipped and reported. Groups use exact field values.
Args: dataset: Dataset index. version: Version. Defaults to the latest. group_by: Field to group by (optional). metric: "count", "sum", "avg", "min" or "max". metric_field: Numeric field for sum/avg/min/max. filters: Same as in query_dataset. text: Free-text filter across all fields. top: Max number of groups to return, largest first.
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": {
"dataset": "<dataset>"
},
"name": "aggregate_dataset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| text | No | ||
| metric | No | count | |
| dataset | Yes | ||
| filters | No | ||
| version | No | ||
| group_by | No | ||
| metric_field | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||