MongoDB
Source: https://runstack.engineer/docs/toolkits/mongodb
Query and manage MongoDB databases, collections, documents, aggregations and indexes.
Tools (27):
| Tool | Description |
|---|---|
mongodbListDatabases | List databases on the MongoDB server with sizes. Use to discover what data is available before querying. |
mongodbPingServer | Ping the MongoDB server to verify connectivity and get server hello metadata. Use to validate the connection. |
mongodbListCollections | List collections (and views) in a database with their types. Use to discover queryable collections. |
mongodbDatabaseStats | Get database storage stats: data size, index size, collection and object counts. Use for capacity review. |
mongodbCollectionStats | Get collection stats: document count, sizes, index details and shard info. Use to inspect a collection before heavy queries. |
mongodbCreateCollection | Create a new collection, optionally capped or with a JSON-schema validator. Use before inserting into a fresh namespace. |
mongodbDropCollection | Drop a collection and all its documents and indexes. Irreversible — confirm with the user first. |
mongodbRenameCollection | Rename a collection within its database. Updates the namespace; indexes move with it. |
mongodbFindDocuments | Find documents with filter, projection, sort, skip and limit. Defaults to 50 docs (max 1000). Use for reads and exploration. |
mongodbFindOne | Find the first document matching a filter. Use for fetching a single record by id or unique key. |
mongodbInsertOne | Insert a single document into a collection. Returns the generated _id. |
mongodbInsertMany | Insert multiple documents in one batch (max 1000 per call). Returns inserted ids. |
mongodbUpdateOne | Update the first document matching a filter with $set/$inc/etc. Supports upsert. |
mongodbUpdateMany | Update all documents matching a filter. Use for bulk status changes and migrations. |
mongodbReplaceOne | Replace a whole document (keeping _id) with a new one. Supports upsert. |
mongodbDeleteOne | Delete the first document matching a filter. |
mongodbDeleteMany | Delete all documents matching a filter. Returns the deleted count — confirm scope with the user first on broad filters. |
mongodbFindOneAndUpdate | Atomically update one document and return it (before or after the change). Use for counters, reservations and read-modify-write. |
mongodbFindOneAndDelete | Atomically delete one document and return it. Use for queue-style claim-and-remove patterns. |
mongodbBulkWrite | Run mixed insert/update/delete operations in one batch for efficiency. |
mongodbAggregate | Run an aggregation pipeline ($match, $group, $lookup, $unwind, …) for analytics and reports. |
mongodbCountDocuments | Count documents matching a filter exactly (scans the collection). Use for filtered totals. |
mongodbEstimatedDocumentCount | Fast estimated collection size from metadata (no filter). Use for quick size checks on large collections. |
mongodbDistinct | List distinct values of a field, optionally filtered. Use for dropdowns, facets and cardinality checks. |
mongodbCreateIndex | Create an index (single, compound, text, geospatial, TTL) to speed queries and enforce uniqueness. |
mongodbListIndexes | List indexes on a collection with keys, uniqueness and sizes. Use to review query coverage. |
mongodbDropIndex | Drop an index by name (use "*" for all non-_id indexes). Use to remove unused or blocking indexes. |