aggregate
Jalankan aggregation pipeline MongoDB untuk analisis data (grouping, join via $lookup, dsb).
Instructions
Jalankan aggregation pipeline MongoDB untuk analisis data (grouping, join via $lookup, dsb).
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": {
"collection": "<collection>"
},
"name": "aggregate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Jumlah maksimum dokumen yang dikembalikan (default 50, maksimum 1000). | |
| database | No | Nama database tujuan. Opsional jika MONGODB_DB sudah diatur. | |
| pipeline | No | Aggregation pipeline MongoDB (array of stages). Contoh: [{"$match": {"status": "aktif"}}, {"$group": {"_id": "$kategori", "total": {"$sum": 1}}}]. | |
| collection | Yes | Nama koleksi. |