Tools
This is a reference catalogue. Tools cannot be configured or run from this page.
Ask docs question
MOTHERDUCK_MCP_ASK_DOCS_QUESTIONAsk a question about DuckDB or MotherDuck. Returns answers from official documentation.
Cancel flight run
MOTHERDUCK_MCP_CANCEL_FLIGHT_RUNCancel an in-flight run of a flight. Identified by the flight UUID and the sequential run number (from list_flight_runs). Returns `canceled: true` on a successful transition; calling on an already-terminal run or one that doesn't exist returns a tool error.
Create flight
MOTHERDUCK_MCP_CREATE_FLIGHTCreate a new MotherDuck flight. Read the flight guide before you create your first flight. A flight is a Python entrypoint (`source_code`) plus an optional `requirements_txt` that runs on MotherDuck compute. Optionally provide an `access_token_name` so the flight can connect to MotherDuck at runtime; omit it to use the default MotherDuck Flights access token. Optionally provide a 5-field cron expression to run on a schedule, an optional `max_runtime_sec` to cap how long a run may take, and an optional `instance_type` (F4, F16 or F32) to pick the runner size. Use flights for ELT/ETL pipelines, loading external data into MotherDuck, refreshing materialized views, or any recurring Python job that reads/writes MotherDuck data.
Create guide
MOTHERDUCK_MCP_CREATE_GUIDECreate a new guide — a markdown document that agents read to answer this org's data questions correctly (metric definitions, join/filter conventions, pitfalls). Group related guides with a lowercase kebab-case `topic` (e.g. 'revenue-billing' or 'core/metrics'); omit it for a guide without a topic. Visibility is controlled by `access`: 'user' (private, default) or 'organization' (org-wide, permission-gated). Personal dive/flight style guides belong under topic 'dives' / 'flights' with access 'user'. Attach `references` to the 1–5 objects the guide is authoritative about.
Delete dive
MOTHERDUCK_MCP_DELETE_DIVEDelete a dive by ID. This action is permanent and cannot be undone.
Delete flight
MOTHERDUCK_MCP_DELETE_FLIGHTPermanently delete a flight, its versions, schedule, and run history. This action cannot be undone.
Delete guide
MOTHERDUCK_MCP_DELETE_GUIDESoft-delete a guide while preserving its version history. Identify it by `uuid`.
Dive query
MOTHERDUCK_MCP_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.
Edit dive content
MOTHERDUCK_MCP_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.
Edit flight source
MOTHERDUCK_MCP_EDIT_FLIGHT_SOURCEEdit a flight's source_code by applying one or more text replacements, then save as a new FlightVersion. Accepts `id` (flight UUID) and `edits` (an array of {old_string, new_string, replace_all?} objects). Reads the current source_code, 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 get_flight call is needed.
Edit guide content
MOTHERDUCK_MCP_EDIT_GUIDE_CONTENTEdit a guide's markdown body by applying one or more text replacements, then save as a new version. Identify the guide by `uuid`. Reads the stored guide, applies edits in sequence, and persists. Example: {uuid: '<guide uuid>', edits: [{old_string: 'foo', new_string: 'bar'}]}. old_string must be unique unless replace_all is true. No prior get_guide call is needed.
Get dive guide
MOTHERDUCK_MCP_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.
Get flight
MOTHERDUCK_MCP_GET_FLIGHTFetch a flight by UUID. Returns metadata plus a version snapshot (source code, requirements, config, secret names, token name). Omit `version` to get the current version; pass a 1-indexed version number to inspect history.
Get flight guide
MOTHERDUCK_MCP_GET_FLIGHT_GUIDELoad instructions for authoring, scheduling, running, and troubleshooting MotherDuck flights. Call this tool first whenever the user asks about creating, updating, or operating a MotherDuck flight.
Get flight logs
MOTHERDUCK_MCP_GET_FLIGHT_LOGSFetch the plain-text logs (stdout + stderr) of a flight run plus the matching `Run` record (status, exit_code, timing). Returns the last 200 lines by default; page with `limit`, `offset` and `order`. Pass `max_bytes` to cap the response size — the response is truncated to fit and the truncation is reported via `truncated: true`.
Get flight run
MOTHERDUCK_MCP_GET_FLIGHT_RUNFetch a single run of a flight by its sequential run number (from list_flight_runs). Returns the same shape as a list_flight_runs entry: status (PENDING/RUNNING/SUCCEEDED/FAILED/CANCELLED), timing metadata, and the effective `config` the run executed with. Use this to poll one run's status instead of re-listing.
Get guide
MOTHERDUCK_MCP_GET_GUIDELoad a guide by uuid. Guides are curated markdown documents about this organization's data (metric definitions, conventions, pitfalls). Find a guide's uuid with `list_guides` or via `get_query_guide` (start there before writing SQL), `get_dive_guide`, or `get_flight_guide`.
Get query guide
MOTHERDUCK_MCP_GET_QUERY_GUIDECall this before writing SQL to answer a data question. Returns this organization's query guidance: what guides exist (curated markdown documents about the data — metric definitions, join/filter conventions, pitfalls), how to navigate them, and an overview of the available guide topics.
Get short lived token
MOTHERDUCK_MCP_GET_SHORT_LIVED_TOKENReturns a short-lived token and connection details for the MotherDuck database endpoint.
List columns
MOTHERDUCK_MCP_LIST_COLUMNSList all columns of a table or view with their types and comments.