---
sidebar_position: 1
title: MD_LIST_DIVES
description: List all Dives in your MotherDuck account with pagination support.
feature_stage: preview
---

Lists all [Dives](/key-tasks/ai-and-motherduck/dives) in your MotherDuck account. Returns metadata for each Dive without the component content.

## Syntax

```sql
SELECT * FROM MD_LIST_DIVES();
SELECT * FROM MD_LIST_DIVES("limit" =100, "offset" =0);
```

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | `UINTEGER` | No | Maximum number of Dives to return |
| `offset` | `UINTEGER` | No | Number of Dives to skip |
| `include_org_shares` | `BOOLEAN` | No | Include Dives shared with your organization. Defaults to `false`. |

:::tip
`limit` and `offset` are reserved SQL keywords and must be double-quoted when used as named parameters.
:::

## Return Columns

| Column | Type | Description |
|--------|------|-------------|
| `id` | `UUID` | Unique identifier of the Dive |
| `title` | `VARCHAR` | Dive title |
| `description` | `VARCHAR` | Dive description |
| `owner_id` | `UUID` | UUID of the Dive owner |
| `current_version` | `INTEGER` | Latest version number (1-based) |
| `created_at` | `TIMESTAMP WITH TIME ZONE` | When the Dive was created |
| `updated_at` | `TIMESTAMP WITH TIME ZONE` | When the Dive was last updated |
| `owner_name` | `VARCHAR` | Name of the Dive owner |

## Examples

List all Dives:

```sql
SELECT * FROM MD_LIST_DIVES();
```

List the 10 most recently updated Dives:

```sql
SELECT id, title, owner_name, updated_at
FROM MD_LIST_DIVES()
ORDER BY updated_at DESC
LIMIT 10;
```

Paginate through Dives:

```sql
SELECT * FROM MD_LIST_DIVES("limit" =20, "offset" =0);  -- first page
SELECT * FROM MD_LIST_DIVES("limit" =20, "offset" =20); -- second page
```

## Related

- [`MD_GET_DIVE`](../md-get-dive) — Read a Dive including its content
- [`MD_LIST_DIVE_VERSIONS`](../md-list-dive-versions) — List version history for a Dive
- [`list_dives` MCP tool](/sql-reference/mcp/list-dives) — AI assistant equivalent
