Count MongoDB documents
mongo_count_documentsCount documents in a MongoDB collection that match a filter within a bounded execution time. Read-only, for query result totals.
Instructions
Count documents matching a MongoDB filter with a bounded max execution time. This tool is read-only in every environment.
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_count_documents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filter | No | ||
| collection | Yes | ||
| timeout_ms | No | ||
| connection_id | Yes | ||
| response_format | No | markdown |