MD_GET_DIVE
Public Preview
Dives are currently in public preview and functionality is subject to change.
Retrieves a single Dive by ID, including the full React component source code for the current version.
Syntax
SELECT * FROM MD_GET_DIVE(id ='your-dive-uuid'::UUID);
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | UUID | Yes | The unique identifier of the Dive |
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 |
version_id | UUID | UUID of the current version |
version_storage_url | VARCHAR | Storage URL of the current version content |
version_description | VARCHAR | Description/commit message for the current version |
version_created_at | TIMESTAMP WITH TIME ZONE | When the current version was created |
version_api_version | UINTEGER | API version used to create this version |
content | VARCHAR | Full JSX/React component source code |
Examples
Read a Dive by ID:
SELECT title, description, content
FROM MD_GET_DIVE(id ='a1b2c3d4-e5f6-7890-abcd-ef1234567890'::UUID);
Get the metadata without the content:
SELECT id, title, owner_name, current_version, updated_at
FROM MD_GET_DIVE(id ='a1b2c3d4-e5f6-7890-abcd-ef1234567890'::UUID);
Errors
Returns an error if the Dive does not exist.
Related
MD_GET_DIVE_VERSION— Retrieve a specific historical versionMD_LIST_DIVES— List all Dives to find IDsread_diveMCP tool — AI assistant equivalent