> ## Documentation Index
> Fetch the complete documentation index at: https://docs.civic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MongoDB

> Document database — find, insert, update, delete, aggregate, and manage collections and indexes

## Overview

MongoDB is a document-oriented database. Connect it to Civic to let your AI agent query and manipulate collections, manage schemas and indexes, and inspect database statistics.

<Card title="Add to Civic" icon="plus" href="https://app.civic.com">
  Connect MongoDB at app.civic.com
</Card>

## Available Tools (17)

| Tool                      | Description                                                            |
| ------------------------- | ---------------------------------------------------------------------- |
| `aggregate`               | Run an aggregation pipeline against a collection                       |
| `collection-indexes`      | Describe the indexes for a collection                                  |
| `collection-schema`       | Describe a collection's schema by sampling documents                   |
| `collection-storage-size` | Get the storage size of a collection                                   |
| `count`                   | Count documents in a collection matching an optional filter            |
| `create-collection`       | Create a new collection in a database                                  |
| `create-index`            | Create an index on a collection                                        |
| `db-stats`                | Return statistics for a single database                                |
| `delete-many`             | Remove all documents matching a filter from a collection               |
| `drop-collection`         | Remove a collection and its associated indexes                         |
| `drop-database`           | Remove a database and its data files                                   |
| `explain`                 | Return query plan statistics for a find, aggregate, or count operation |
| `export`                  | Export query or aggregation results in EJSON format                    |
| `find`                    | Run a find query against a collection                                  |
| `insert-many`             | Insert an array of documents into a collection                         |
| `list-collections`        | List all collections in a database                                     |
| `list-databases`          | List all databases for the connection                                  |
| `mongodb-logs`            | Return the most recent logged mongod events                            |
| `rename-collection`       | Rename a collection within a database                                  |
| `update-many`             | Update all documents matching a filter in a collection                 |

***

## Guardrails

This server supports all [14 universal guardrails](/civic/concepts/guardrails). Server-specific guardrails are coming soon.
