LLMs to turn Ad Hoc Questions into Real-Time AnswersRegister

Skip to main content

update_dive

Public Preview

Dives are currently in public preview and functionality is subject to change.

Update an existing Dive's title, description, or content. Returns a URL to the Dive in MotherDuck as a link the user can click to view the updated Dive.

Description

The update_dive tool modifies an existing Dive in your MotherDuck workspace. You can update the title, description, content (React component code), or any combination. At least one field must be provided.

When updating content, the tool validates the new code before saving, just like save_dive. It also analyzes which databases the Dive queries and reports any unshared databases.

Use list_dives to find the Dive ID, and read_dive to inspect the current code before modifying it.

Input Parameters

ParameterTypeRequiredDescription
idstringYesThe unique identifier (UUID) of the Dive to update
titlestringNoNew title for the Dive
descriptionstringNoNew description for the Dive
contentstringNoNew JSX/React component code

At least one of title, description, or content must be provided.

Output Schema

{
"success": boolean,
"dive": { // Updated dive info (on success)
"id": string // Dive identifier
},
"dive_url": string, // URL to view the Dive (on success)
"warnings": string[], // Validation warnings (if any)
"database_warnings": string[], // Warnings from database analysis (if any)
"unshared_databases": string[], // Database names not yet shared with the org (if any)
"next_steps": string[], // Ordered instructions for the AI to follow after updating
"error": string, // Error message (on failure)
"validationErrors": [ // Validation errors (on failure)
{
"type": string,
"message": string,
"details": string
}
]
}

Example Usage

Update a Dive's content:

Add a region filter to my revenue trends Dive

The AI assistant will call read_dive to get the current code, modify it, then call update_dive:

{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"content": "import { useSQLQuery } from \"@motherduck/react-sql-query\";\n// ... updated component with region filter\n"
}

Update just the title and description:

Rename my revenue Dive to "Q1 Revenue Dashboard"
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"title": "Q1 Revenue Dashboard",
"description": "Revenue trends filtered to Q1 2025"
}

Success Response Example

{
"success": true,
"dive": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
"dive_url": "https://app.motherduck.com/dives/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"next_steps": [
"Regenerate the dive preview artifact with the updated banner...",
"Show the dive to the user in chat as a markdown hyperlink using the dive title: [dive title](https://app.motherduck.com/dives/a1b2c3d4-...)"
]
}

Error Response Example

{
"success": false,
"error": "At least one of title, description, or content must be provided"
}