read_dive
Dives are currently in public preview and functionality is subject to change.
Read a specific Dive by ID, including its full JSX/React component code. Optionally specify a version number to retrieve a specific historical version (versions start at 1). If no version is specified, the latest version is returned.
Description
The read_dive tool retrieves a Dive's complete details, including its title, description, timestamps, and the full React component source code. Use this to inspect an existing Dive before updating it, or to understand how a Dive is built.
Use list_dives first to find the Dive ID and its current_version.
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The unique identifier (UUID) of the Dive to read |
version | number | No | Version number to retrieve (1-indexed). Defaults to the latest version. |
Output Schema
{
"success": boolean,
"dive": { // Dive object (on success)
"id": string, // Unique identifier (UUID)
"title": string, // Dive title
"description": string, // Dive description
"content": string, // Full JSX/React component code
"current_version": number, // Current version number
"created_at": string, // ISO 8601 creation timestamp
"updated_at": string // ISO 8601 last update timestamp
},
"error": string // Error message (on failure)
}
Example Usage
Read a Dive to inspect its code:
Show me the code for my revenue trends Dive
The AI assistant will call the tool with the Dive's ID:
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
Read a specific version of a Dive:
Show me version 1 of my revenue trends Dive
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"version": 1
}
Read a Dive before updating it:
I want to modify my customer signups Dive—can you show me what it looks like?
Success Response Example
{
"success": true,
"dive": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"title": "Monthly Revenue Trends",
"description": "Line chart showing revenue by month",
"content": "import { useSQLQuery } from \"@motherduck/react-sql-query\";\n\nexport default function Dive() {\n const { data, isLoading } = useSQLQuery(`SELECT ...`);\n // ...\n}",
"current_version": 3,
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-20T14:45:00Z"
}
}
Error Response Example
{
"success": false,
"error": "Dive with ID 'invalid-uuid' not found"
}