aggregate
Run an aggregation pipeline on a MongoDB collection, with optional execution plan analysis for query performance insights.
Instructions
Execute a MongoDB aggregation pipeline with optional execution plan analysis
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| explain | No | Optional: Get aggregation execution information (queryPlanner, executionStats, or allPlansExecution) | |
| pipeline | Yes | Aggregation pipeline stages | |
| collection | Yes | Name of the collection to aggregate | |
| objectIdMode | No | Control how 24-character hex strings are handled | auto |