FruxonDocs

MongoDB

MongoDB database integration for querying, inserting, updating, and aggregating documents

The MongoDB integration lets your agents query, insert, update, delete, and aggregate documents in MongoDB databases.

Prerequisites

You need:

  • MongoDB connection string — The URI for your MongoDB instance (e.g., mongodb+srv://user:pass@cluster.mongodb.net/). This includes authentication credentials.
  • Database name — The default database your agent will work with.

Setup

  1. Open Integrations from the sidebar
  2. Select MongoDB from the catalog
  3. Click Add Integration Config
  4. Give the config a display name (e.g., "MongoDB - Production")
  5. Enter the configuration parameters:
    • Connection String — Your MongoDB URI (stored encrypted)
    • Database — The default database name
  6. Save the config

No separate authentication setup is needed — credentials are embedded in the connection string.

Using in Your Agent

  1. Open your agent in Agent Studio. Under Model & capabilities → Tools, click Add tool and add the MongoDB tools you need
  2. On a tool's card, choose your config under Set default credentials. It applies to every MongoDB tool in the agent; click Override on one tool's card to give it a different config
  3. Tools are referenced as mongodb.find, mongodb.insert_one, etc.

Available Tools

ToolDescriptionAction Type
list_collectionsList all collections in the databaseReadOnly
findQuery documents from a collectionReadOnly
countCount documents matching a filterReadOnly
aggregateRun an aggregation pipelineReadOnly
insert_oneInsert a single documentReversible
insert_manyInsert multiple documentsReversible
update_oneUpdate a single documentReversible
update_manyUpdate multiple documentsReversible
delete_oneDelete a single documentIrreversible
delete_manyDelete multiple documentsIrreversible

On this page