| Category | Databases |
| CLI | mongosh |
| Auth | None (uses connection string) |
| Config | MONGODB_URI (optional) |
What it does
Abschnitt betitelt „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
Abschnitt betitelt „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
Abschnitt betitelt „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
Abschnitt betitelt „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”