Aggregate MongoDB documents
mongo_aggregateRun bounded read-only MongoDB aggregation pipelines for safe querying. It rejects write stages and applies a result limit to prevent unintended data changes or oversized outputs.
Instructions
Run a bounded read-only MongoDB aggregation. Data MCP recursively rejects $out and $merge stages and appends a result limit.
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": {
"connection_id": "<connection_id>",
"collection": "<collection>"
},
"name": "mongo_aggregate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| pipeline | No | ||
| collection | Yes | ||
| timeout_ms | No | ||
| connection_id | Yes | ||
| response_format | No | markdown |