
Dataset Aggregate & Pivot
io.github.Nero-Enginev0.1.0更新於 Oct 10, 2026
GROUP BY and pivot tables for JSON rows: 11 functions, date buckets, top N, totals, messy numbers.
概覽
讓助理用一次工具呼叫,把 JSON 資料列分組、聚合並樞紐成摘要表。
- 功能
- 提供兩個工具:list_capabilities 說明可用的函式與限制,不處理資料;aggregate_rows 依一或多個欄位分組,套用 11 種聚合函式,把某個欄位的相異值樞紐成欄,並支援排序、保留前 N 組與加入總計列。也支援以日、ISO 週、月、季或年做日期分桶,並能正規化貨幣字串、大小寫不一致等雜亂值。每次呼叫會回傳摘要列,以及分組數、被捨棄的組、被略過的值與警告的報告。
- 適用情境
- 適合助理取得來自爬蟲、API 或試算表的 JSON 資料列後,需要在不寫程式的情況下產出分組摘要、樞紐表或前 N 名排名。較適合小規模的一次性彙總,而非大規模或週期性的資料流程。
- 執行需求
- 遠端 streamable HTTP 端點;未宣告需要安裝、API 金鑰或註冊。資料列以 JSON 內嵌傳入,因此需要能連線至該端點的網路。每次呼叫限制為 500 列、20 個聚合、50 個樞紐欄與 5,000 個樞紐儲存格。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Dataset Aggregate & Pivot,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。
{
"mcpServers": {
"dataset-aggregate-pivot": {
"type": "http",
"url": "https://dataset-aggregate-pivot.nerolabs.workers.dev/mcp"
}
}
}README
Dataset Aggregate & Pivot (Remote MCP Server)
SQL GROUP BY and spreadsheet pivot tables for messy JSON rows, in a single tool call. Hand it a list of rows from a scraper, an API or a spreadsheet, say what to group by and what to compute, and it hands back one clean summary row per group plus an exact account of anything it skipped.
Built for AI agents. No install, no API key, no signup. Connect by URL and call it.
Free to use while in early access.
What it does
One call runs the whole summary, in this order:
- Group the rows by one or several fields (dot paths like
address.citywork), or leave the group fields empty to summarise every row into one. Add a date bucket to group a date or timestamp by day, ISO week, month, quarter or year (orderedAtbecomesorderedAt_month=2026-08). - Aggregate each group with any of 11 functions: count, countDistinct, sum, avg, min, max, median, first, last, list and listDistinct, each with its own output column name.
- Pivot one field's distinct values into columns: group by
region, pivot onproduct, fill the cells with the sum ofamount, and get one row per region with a column per product, zero-filled where a combination has no rows. - Sort by any output column, keep the top N groups, and add a grand-total row that still covers every input row.
Messy data is the normal case. South, south and SOUTH land in one group with one label. "$1,234.50", "49 USD", "1.234,50" and "(300)" are read as numbers. Values that genuinely are not numbers, like "n/a", are never guessed at: they are left out and counted in the summary, and a misspelled field name comes back as a warning instead of a silently empty result.
Tools
Connect
Claude Code
Claude Desktop / claude.ai: Settings, Connectors, Add custom connector, paste the URL above.
Cursor, Windsurf, VS Code and other MCP clients
Example
Eight messy order rows go in, with orders per region and each product's revenue pivoted into its own column:
Four summary rows come out. South and south became one group, "$1,200.00" summed as 1200, the row with no region is kept visibly as (blank), and the "n/a" amount was skipped and reported rather than treated as a number:
Add "sortBy": "orders", "sortDirection": "desc", "topN": 10, "includeTotalsRow": true to the same call for a top 10 with a grand total, or "dateBucketField": "orderedAt" for one row per region per month.
Limits
- Up to 500 rows per call. Anything larger returns a clear message rather than failing silently. Batches can be summarised separately for sum, count, min and max, and an average rebuilt as total sum divided by total count, but a median or a distinct count cannot be combined across batches.
- Up to 50 pivot columns and 5,000 pivot cells (groups multiplied by pivot columns) per call, so a pivot on a near-unique field such as an ID is refused with advice instead of returning hundreds of columns.
- Up to 20 aggregations per call.
- Rows are passed inline as JSON.
Privacy
Your rows are processed in memory and never stored. To see which tools get used, each call records the tool name, row counts, whether it succeeded, the client name your app reports, the country and a one-way hashed caller ID. Your data, your arguments and your IP address are never kept in that log.
Also available
The same engine runs on the Apify Store as Dataset Aggregate, Group By & Pivot, which also reads Apify datasets, CSV, TSV, Excel, JSON and JSON Lines files and Google Sheets by URL, handles up to 200,000 rows per run, exports the summary as a CSV or Excel file, appends it to a named dataset that accumulates across scheduled runs, and posts it to a webhook.
Built by Nero Labs.
來源:README.md,提交 3b22ee2
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
