Add readonly database tool calling

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Developer Tools

      Add a new setting "enable readonly database tool calling" and set it to enabled by default. In DE this will be a project-level setting.

      Add a user data "setting" for DE that corresponds with this so that even if it is on at the project level, a user can still turn it off for themselves.

      Add a subset of the readonly MongoDB MCP Server tools. These will be enabled if the setting is on (in the DE case also the user data setting) and the user is currently has a connection focused:

      1. Find
      2. Aggregate
      3. Count
      4. List-databases
      5. List-collections
      6. Collection-indexes
      7. Collection-schema
      8. Collection-storage-size
      9. Db-stats

      Note that connect and export are deliberately left out.

      The focused connection is defined as the active connection (if any) that relates to the active workspace tab.

      As the user navigates around Compass the global assistant context changes. Then as the focused connection changes the MongoDB MCP Server's connection manager will track the same connection.

      The connection manager will lazily connect: When a user sends a prompt and there's a focused connection it will connect to that connection if it isn't connected to it yet, disconnecting from whatever it was connected to before, if anything.

      When a user browses away from any focused connection (ie. closes all tabs or lands on the Welcome or My Queries tab) it will disconnect.

      Therefore the "MongoDB MCP Server" tools are always connected to zero or one clusters.

      Database tool calls will then be routed to that focused connection.

      Every tool call will elicit confirmation from the user. At that point it will make it clear exactly it it will do to which connection, database and collection.

       

            Assignee:
            Unassigned
            Reporter:
            Le Roux Bodenstein
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: