Pivot table
pivot_tableCross-tabulate CSV data by setting one column as rows and another as columns, then aggregate a value column with count, sum, mean, min, max, or median.
Instructions
Cross-tabulate: one column as rows, another as columns, aggregating a value column. Max 50 output columns.
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": {
"file": "<file>",
"rows": "<rows>",
"columns": "<columns>"
},
"name": "pivot_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agg | No | sum | |
| file | Yes | CSV path relative to the allowed directory (CSV_INSIGHTS_DIR), e.g. 'sales/2026-q3.csv' | |
| rows | Yes | Column whose values become rows | |
| value | No | Column to aggregate (omit for counts) | |
| where | No | Row filters, all must match (AND) | |
| columns | Yes | Column whose values become columns |