collection-storage-size
Retrieve the storage size of a MongoDB collection. Provide the database and collection names to get the current size, helping you monitor data usage and plan capacity.
Instructions
Gets the size of the collection
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": {
"connectionId": "<connectionId>",
"database": "<database>",
"collection": "<collection>"
},
"name": "collection-storage-size"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes | Database name | |
| collection | Yes | Collection name | |
| connectionId | Yes | The connection to run the operation against. Use the id returned by one of the connect tools, or "preconfigured" to use the connection string the server was configured with. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | Yes | ||
| units | Yes |