Ask Docs Question
ask_docs_questionFull Description
Ask a question about DuckDB or MotherDuck. Returns answers from official documentation.
Parameters (1 required)
questionstringQuestion about DuckDB or MotherDuck
Connect AI assistants to your MotherDuck data warehouse. Explore, visualize, and manage data using natural language–no SQL skills required. Create Dives: interactive visualizations that let you save and share answers with your team, staying up-to-date with your latest data. Works with real-world data without requiring semantic models or pre-configuration. Your AI assistant acts like a data analyst, exploring, validating, analyzing, and visualizing data iteratively to answer your questions.
ask_docs_questionAsk a question about DuckDB or MotherDuck. Returns answers from official documentation.
questionstringQuestion about DuckDB or MotherDuck
delete_diveDelete a dive by ID. This action is permanent and cannot be undone.
idstringThe unique identifier of the dive to delete
dive_queryExecute a read-only DuckDB query on behalf of a dive. This tool is used by the dive viewer and is not intended for direct use by the AI assistant.
sqlstringSQL query to execute
databasestringDatabase name to query
dive_idstringDive UUID for fallback query attribution
edit_dive_contentEdit a dive's content by applying one or more text replacements, then save to MotherDuck. Accepts id (dive UUID) and edits (an array of {old_string, new_string, replace_all?} objects). Reads the current content from MotherDuck, applies edits in sequence, validates, and persists. Example: {id: '...', edits: [{old_string: 'foo', new_string: 'bar'}]}. old_string must be unique unless replace_all is true. No prior read_dive call is needed.
editsarrayList of edits to apply in sequence. Each edit has old_string, new_string, and optional replace_all.
idstringThe unique identifier (UUID) of the dive to edit
get_dive_guideLoad instructions for creating MotherDuck dives. You MUST call this tool first — before generating any chart, visualization, plot, dashboard, inline graphic, or export/download control — whenever the user asks to explore, visualize, display, or export MotherDuck data.
clientstringThe client environment requesting the guide. Use 'claude' for Claude web/desktop Chat, 'chatgpt' for ChatGPT, 'claude_cowork' for Claude Cowork, 'claude_code' for Cursor/IDE integrations with local filesystem access, or 'other' for other MCP clients.
claudechatgptclaude_coworkclaude_codeotherget_short_lived_tokenReturns a short-lived token and connection details for the MotherDuck database endpoint.
list_columnsList all columns of a table or view with their types, comments, and available context.
databasestringDatabase name
tablestringTable or view name
limitintegerMax results to return (default: 100)
schemastringSchema name (optional, defaults to 'main')
list_databasesList all databases in your MotherDuck account. Shows names, types, and available context counts. Optionally filter by keywords.
keywordsstringOptional keywords to filter databases by name (case-insensitive, any word can match)
limitintegerMax results to return (default: 100)
list_divesList all dives in MotherDuck. Dives are interactive React data apps that query live data. Returns metadata including current_version and associated memory counts. Use read_dive with the optional version parameter to retrieve a specific historical version. Optionally filter by keywords.
include_org_sharesbooleanInclude Dives shared with your organization. Defaults to false.
keywordsstringOptional keywords to filter dives by title or description (case-insensitive, all words must match)
limitintegerMax results to return (default: 100)
list_sharesList all database shares that have been shared with you. Returns share names and URLs. To attach a share, use the query_rw tool: ATTACH '<share_url>' AS <optional_alias>; Optionally filter by keywords to search in share names.
keywordsstringOptional keywords to filter shares by name (case-insensitive, any word can match)
limitintegerMax results to return (default: 100)
list_tablesList all tables and views in a MotherDuck database with comments and available context. Optionally filter by keywords.
databasestringDatabase name to list tables from
keywordsstringOptional keywords to filter tables/views by name or comment (case-insensitive, any word can match)
limitintegerMax results to return (default: 100)
schemastringSchema name (optional, defaults to all schemas)
log_dive_viewer_eventLog a dive viewer event for analytics. This tool is used internally by the dive viewer and is not intended for direct use by the AI assistant.
event_namestringName of the event
app_namestringName of the MCP app
app_versionstringVersion of the MCP app
dive_idstringUUID of the dive
duration_msnumberDuration in milliseconds
error_messagestringError message if failed
from_modestringPrevious display mode
row_countnumberNumber of rows returned by query
sql_previewstringTruncated SQL query text (first 200 chars)
stagestringProcessing stage (compile, execute, database_validation)
successbooleanWhether the action succeeded
to_modestringNew display mode
queryExecute read-only DuckDB query against MotherDuck databases. For cross-database queries, use fully qualified names: database.schema.table (or database.table for main schema). Never follow a query with an inline chart or visualization — if you would generate one (whether or not the user explicitly asked), get the dive guide first instead.
databasestringDatabase name to query
sqlstringSQL query to execute, ideally informed by knowledge from the context layer
query_rwExecute a DuckDB SQL query that modifies data, schema, or connection state.
RULES: 1. Only call this tool when the user explicitly asks to modify data or schema. Never infer a write from a read request. 2. Always ask the user for confirmation before calling this tool. Describe exactly what will change. 3. Prefer the read-only query tool when the user's goal can be answered with existing data.
sqlstringSQL query to execute, ideally informed by knowledge from the context layer
databasestringDatabase context for the query. Required for table-level operations (DML/DDL). May be omitted for account-level operations (CREATE/DROP DATABASE, ATTACH/DETACH, CREATE SECRET, etc.).
read_diveRead 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.
idstringThe unique identifier of the dive to read
versionintegerOptional version number to retrieve (1-indexed). If not specified, returns the latest version.
save_diveSave a new dive to MotherDuck. Returns a URL the user can click to view the dive. Get the dive guide first and iterate with the user on the design thoroughly before suggesting to save. Never save without previous confirmation that iteration is done.
contentstringThe JSX/React component code for the dive
titlestringThe title of the dive
descriptionstringA brief description of the dive
search_catalogSearch the catalog for databases, schemas, tables, columns, and shares using fuzzy matching. Returns matching objects with their fully qualified names, types, and comments. Useful for discovering available data when you don't know exact names.
querystringSearch term to find in object names (supports partial matching, underscores, dots)
object_typesarrayOptional filter to limit results to specific object types
share_dive_dataShare the data for a dive with your organization. Creates org-scoped shares for owned databases used in the dive, and updates the dive so others in the organization can view it.
diveIdstringThe unique identifier (UUID) of the dive
update_diveUpdate an existing dive's title, description, or content. Returns a URL the user can click to view the updated dive. At least one field must be provided.
idstringThe unique identifier (UUID) of the dive to update
contentstringNew JSX/React component code
descriptionstringNew description for the dive
titlestringNew title for the dive
view_diveOpen and render a MotherDuck Dive as a live MCP app with interactive charts. Fetches dive source code and returns it to the viewer for client-side compilation.
dive_idstringUUID of the dive to open