---
sidebar_position: 4
title: MD_UPDATE_DIVE_METADATA
description: Update a Dive's title or description without creating a new version.
feature_stage: preview
---

Updates the title and/or description of an existing [Dive](/key-tasks/ai-and-motherduck/dives). This does not create a new version—only the metadata is changed.

## Syntax

```sql
SELECT * FROM MD_UPDATE_DIVE_METADATA(
  id ='your-dive-uuid'::UUID,
  title ='New Title',
  description ='New description'
);
```

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | `UUID` | Yes | The unique identifier of the Dive to update |
| `title` | `VARCHAR` | No | New title for the Dive |
| `description` | `VARCHAR` | No | New description for the Dive |

At least one of `title` or `description` should be provided.

## Return Columns

| Column | Type | Description |
|--------|------|-------------|
| `id` | `UUID` | Unique identifier of the Dive |
| `title` | `VARCHAR` | Updated Dive title |
| `description` | `VARCHAR` | Updated Dive description |
| `owner_id` | `UUID` | UUID of the Dive owner |
| `current_version` | `INTEGER` | Current version number (unchanged) |
| `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

Update a Dive's title:

```sql
SELECT id, title, updated_at
FROM MD_UPDATE_DIVE_METADATA(
  id ='a1b2c3d4-e5f6-7890-abcd-ef1234567890'::UUID,
  title ='Q1 Revenue Dashboard'
);
```

Update both title and description:

```sql
SELECT *
FROM MD_UPDATE_DIVE_METADATA(
  id ='a1b2c3d4-e5f6-7890-abcd-ef1234567890'::UUID,
  title ='Q1 Revenue Dashboard',
  description ='Revenue breakdown by region for Q1 2025'
);
```

## Errors

Returns an error if the Dive does not exist.

## Related

- [`MD_UPDATE_DIVE_CONTENT`](../md-update-dive-content) — Update a Dive's content (creates a new version)
- [`update_dive` MCP tool](/sql-reference/mcp/update-dive) — AI assistant equivalent
