> ## Documentation Index
> Fetch the complete documentation index at: https://docs.macro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DescribeDatabase

> Read one database's schema: its tables with their quoted `sqlName`, version and saved views, and each table's columns with their SQL names, types (with the kind of an entity column, `USER` for a person column), whether they hold several values, the labels a select column accepts, the target table of a relation, and the types the column can change to.  **Call this before writing SQL for a database you have not already described in this conversation.** Guessing table or column names is the single most common way a query fails, and the schema is small. Get the `databaseId` from ListDatabases. QueryDatabase describes the SQL dialect.

# DescribeDatabase

Read one database's schema: its tables with their quoted `sqlName`, version and saved views, and each table's columns with their SQL names, types (with the kind of an entity column, `USER` for a person column), whether they hold several values, the labels a select column accepts, the target table of a relation, and the types the column can change to.

**Call this before writing SQL for a database you have not already described in this conversation.** Guessing table or column names is the single most common way a query fails, and the schema is small. Get the `databaseId` from ListDatabases. QueryDatabase describes the SQL dialect.

## Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `databaseId` | string | Yes | Id of the database to describe, as returned by ListDatabases. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.