aggregate
Run aggregation pipelines on MongoDB data to filter, transform, and analyze documents, including vector search capabilities.
Instructions
Run an aggregation against a MongoDB collection
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes | Database name | |
| pipeline | Yes | ||
| collection | Yes | Collection name | |
| responseBytesLimit | No | The maximum number of bytes to return in the response. This value is capped by the server's configured maxBytesPerQuery and cannot be exceeded. Note to LLM: If the entire aggregation result is required, use the "export" tool instead of increasing this limit. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | The total number of documents returned by the aggregation pipeline | |
| documents | Yes | The documents returned by the aggregation pipeline | |
| appliedLimits | Yes | The limits applied to the aggregation pipeline |