run_aggregation
Run custom aggregation pipelines on MongoDB collections to transform and analyze data. Use stages to filter, group, and sort documents for complex queries.
Instructions
Run an aggregation pipeline on a collection
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": {
"database": "<database>",
"collection": "<collection>",
"pipeline": "<pipeline>"
},
"name": "run_aggregation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes | The database name | |
| pipeline | Yes | The aggregation pipeline stages | |
| collection | Yes | The collection name |