---
sidebar_position: 1
title: list_databases
description: List all databases in your MotherDuck account
---

# list_databases

List all databases in your MotherDuck account with their names and types.

## Description

The `list_databases` tool returns all databases accessible to your MotherDuck account, including both owned databases and attached shared databases. This is useful for discovering what data is available before running queries.

## Input Parameters

This tool takes no input parameters.

## Output Schema

```json
{
  "success": boolean,
  "databases": [                 // List of databases (on success)
    {
      "alias": string,           // Database name/alias
      "is_attached": boolean,    // Whether the database is currently attached
      "type": string             // Database type (e.g., "motherduck", "memory")
    }
  ],
  "error": string                // Error message (on failure)
}
```

## Example Usage

**List available databases:**

```text
What databases do I have access to?
```

The AI assistant will call the tool with no parameters.

## Success Response Example

```json
{
  "success": true,
  "databases": [
    {
      "alias": "my_db",
      "is_attached": true,
      "type": "motherduck"
    },
    {
      "alias": "analytics",
      "is_attached": true,
      "type": "motherduck"
    },
    {
      "alias": "shared_sales_data",
      "is_attached": true,
      "type": "motherduck"
    }
  ]
}
```

