MongoDB
| Category | Databases |
| CLI | mongosh |
| Auth | None (uses connection string) |
| Config | MONGODB_URI (optional) |
What it does
Section titled “What it does”Wraps mongosh (MongoDB Shell) to give CodeBuddy access to MongoDB databases. The agent can run queries, inspect collections, manage indexes, and perform aggregations.
Prerequisites
Section titled “Prerequisites”Install mongosh:
# macOSbrew install mongosh
# Linux (Debian/Ubuntu)sudo apt-get install -y mongodb-mongosh
# Windowswinget install MongoDB.ShellOptionally set a default connection URI:
export MONGODB_URI="mongodb://localhost:27017/mydb"Capabilities
Section titled “Capabilities”- Queries — find, insert, update, delete, aggregate
- Collections — list, create, drop, stats
- Indexes — create, list, drop, explain
- Aggregation — pipelines,
$lookup,$group,$match - Admin — server status, replica set info, profiling
Example prompts
Section titled “Example prompts”- “Show all collections in the
myappdatabase” - “Find users who haven’t logged in for 90 days”
- “Create an index on
orders.createdAt” - “Run an aggregation to get total revenue by month”