MD_GET_DIVE_VERSION
Public Preview
Dives are currently in public preview and functionality is subject to change.
Retrieves a specific version of a Dive, including the full React component source code. Version numbers are 0-based—the first version of a Dive is version 0.
Syntax
SELECT * FROM MD_GET_DIVE_VERSION(
id = 'your-dive-uuid'::UUID,
version = 0
);
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | UUID | Yes | The unique identifier of the Dive |
version | UINTEGER | Yes | The version number to retrieve (0-based) |
Return Columns
| Column | Type | Description |
|---|---|---|
id | UUID | UUID of this version |
version | UINTEGER | Version number |
storage_url | VARCHAR | Storage URL of the version content |
description | VARCHAR | Version description or commit message |
created_at | TIMESTAMP WITH TIME ZONE | When this version was created |
api_version | UINTEGER | API version used to create this version |
content | VARCHAR | Full JSX/React component source code |
Examples
Read the original version of a Dive:
SELECT content
FROM MD_GET_DIVE_VERSION(
id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'::UUID,
version = 0
);
Compare version metadata:
SELECT version, description, created_at
FROM MD_GET_DIVE_VERSION(
id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'::UUID,
version = 2
);
Errors
Returns an error if the Dive or the specified version does not exist.
Related
MD_LIST_DIVE_VERSIONS— List all versions to find version numbersMD_GET_DIVE— Get the latest version of a Diveread_diveMCP tool — AI assistant equivalent (supportsversionparameter)