MD_UPDATE_DIVE_CONTENT
Public Preview
Dives are currently in public preview and functionality is subject to change.
Updates the content of an existing Dive, creating a new version. Each call increments the version number. Previous versions remain accessible via MD_GET_DIVE_VERSION.
Syntax
SELECT * FROM MD_UPDATE_DIVE_CONTENT(
id ='your-dive-uuid'::UUID,
content ='<updated JSX component code>'
);
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | UUID | Yes | The unique identifier of the Dive to update |
content | VARCHAR | Yes | The new JSX/React component code |
description | VARCHAR | No | Version description or commit message |
api_version | UINTEGER | No | API version for the Dive format. Defaults to 1. |
Return Columns
| Column | Type | Description |
|---|---|---|
id | UUID | UUID of the new version (not the Dive UUID) |
version | UINTEGER | New version number (0-based) |
storage_url | VARCHAR | Storage URL of the version content |
description | VARCHAR | Version description |
created_at | TIMESTAMP WITH TIME ZONE | When this version was created |
api_version | UINTEGER | API version used |
Examples
Update a Dive's content:
SELECT version, created_at
FROM MD_UPDATE_DIVE_CONTENT(
id ='a1b2c3d4-e5f6-7890-abcd-ef1234567890'::UUID,
content ='<updated component code>'
);
Update with a version description:
SELECT *
FROM MD_UPDATE_DIVE_CONTENT(
id ='a1b2c3d4-e5f6-7890-abcd-ef1234567890'::UUID,
content ='<updated component code>',
description ='Added region filter'
);
Errors
Returns an error if the Dive does not exist.
Related
MD_UPDATE_DIVE_METADATA— Update title or description without creating a new versionMD_LIST_DIVE_VERSIONS— List all versions of a Diveupdate_diveMCP tool — AI assistant equivalent