Column stats
column_statsCompute one statistic over a single column: sum, avg, min or max (numeric, rounded to 2 dp, blanks ignored), count of non-empty cells, or the sorted distinct values. Use for quick answers like 'total of the price column'. Do NOT use to reshape the table; use split_column or convert_table.
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": {
"data": "<data>",
"column": "<column>",
"op": "<op>"
},
"name": "column_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | Statistic: sum, avg, min, max (column must be numeric), count (non-empty cells) or distinct (unique values). | |
| data | Yes | The whole table as text, first row = header. CSV/TSV text (quoted cells allowed), or a JSON array of flat objects, e.g. "name,age\nAsha,30". | |
| column | Yes | Column to use: the exact header name (case-sensitive), or a 0-based column index as digits, e.g. "price" or "2". | |
| format | No | Format of 'data' and of the returned table: csv, tsv or json. Default csv. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | The statistic that was computed. | |
| column | Yes | Header name of the column that was analysed. | |
| result | Yes | Numeric result for sum/avg/min/max/count, or a sorted array of distinct string values for distinct. |