We Built a Machine for Getting AnswersTry the MotherDuck MCP

Skip to main content

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

{
"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:

What databases do I have access to?

The AI assistant will call the tool with no parameters.

Success Response Example

{
"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"
}
]
}