Building an Analytics Chatbot for your SaaS app in 1 dayLivestream March 11

Skip to main content

get_dive_guide

Preview
This feature is in preview and is subject to change.

Load instructions for creating MotherDuck Dives. Call this before creating or saving dives.

Description

The get_dive_guide tool returns comprehensive instructions on how to write MotherDuck Dives—interactive React data apps that query live MotherDuck data. It provides guidance on the useSQLQuery hook, data type conversions, available libraries, and design system. The guide content is tailored to the AI client you are using.

Call this tool before using save_dive or update_dive to ensure the generated code follows the correct format.

note

Dives are available on all MotherDuck plans at no additional charge.

Input Parameters

ParameterTypeRequiredDescription
clientstringYesThe AI client being used: "claude", "chatgpt", "claude_code", or "other"

Client options

ClientUse case
claudeClaude (Anthropic) via Claude.ai or API
chatgptChatGPT (OpenAI)
claude_codeClaude Code (terminal-based agent)
otherAny other AI client or custom integration

Output Schema

{
"success": boolean,
"guide": string, // Dive guide content (on success) or upgrade message
"client": string, // The client that was used (on success)
"reason": string, // "upgrade_required" (when plan doesn't support Dives)
"plan": string, // Current plan name (when upgrade required)
"error": string // Error message (on failure)
}

On success, guide contains the client-specific instructions for building Dives.

Example Usage

Build a new Dive from Claude:

Create a Dive showing monthly revenue trends for my sales database

The AI assistant will first call get_dive_guide to load the instructions:

{
"client": "claude"
}

Build a Dive from ChatGPT:

Create a Dive with a bar chart of customer signups by region
{
"client": "chatgpt"
}

Build a Dive from Claude Code:

Create a Dive showing daily active users over the past 90 days
{
"client": "claude_code"
}