INNER CODE UNIT · JavaScript

dbExists

furey/mongodb-lens · mongodb-lens.js:1629

          const dbExists = dbs.some(db => db.name === name)
          if (!dbExists) throw new Error(`Database '${name}' does not exist`)

          const newToken = storeDropDatabaseToken(name)
          return {
            content: [{
              type: 'text',
              text: `⚠️ DESTRUCTIVE OPERATION WARNING ⚠️\n\nYou've requested to drop the database '${name}'.\n\nThis operation is irreversible and will permanently delete all collections and data in this database.\n\nTo confirm, you must type the 4-digit confirmation code EXACTLY as shown below:\n\nConfirmation code: ${newToken}\n\nThis code will expire in 5 minutes for security purposes.\n\n${importantNoticeToAI}`
            }]
          }
        }, `Error processing database drop for '${name}'`)
      }
    )
  }

  if (!isDisabled('tools', 'create-user')) {
    server.tool(
      'create-user',

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…