count_documents
Count documents in a MongoDB collection that match a query filter. Provide the collection name and optional query to get the exact number of matching documents.
Instructions
Count matching documents.
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": {
"collection_name": "<collection_name>"
},
"name": "count_documents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | ||
| collection_name | Yes |