Skip to content

MCP Tool Reference โ€‹

All tools are available via the MCP server at http://127.0.0.1:37421/mcp.

Canvas IDs

Most node-creation and import tools accept an optional canvas_id parameter. Omit it to target the active canvas, or pass an ID from list_canvases to write to a specific tab.


Data tools โ€‹

list_tables โ€‹

List all tables and views currently loaded in DuckDB.

No parameters.


run_query โ€‹

Execute a SQL query and return the results.

ParameterTypeRequiredDescription
sqlstringโœ“SQL to execute

materialize_query โ€‹

Run a SQL query and persist the results as a DuckDB table, then add it to the canvas as a data node.

ParameterTypeRequiredDescription
sqlstringโœ“SQL to execute
table_namestringโœ“Name for the new table
source_idstringNode ID of a query node to link for staleness tracking
canvas_idstringTarget canvas tab (default: active canvas)

Canvas inspection โ€‹

list_canvases โ€‹

Return all canvas tabs with their IDs and names. The active tab is marked [active].

No parameters.


list_canvas_nodes โ€‹

Return all nodes on the canvas with their IDs, kinds, positions, and sizes.

ParameterTypeRequiredDescription
canvas_idstringFilter to a specific canvas tab; omit to list all canvases

Canvas tab management โ€‹

create_canvas โ€‹

Create a new canvas tab and switch to it.

ParameterTypeRequiredDescription
namestringDisplay name for the new tab (default: Canvas N)

Returns the new canvas ID in the response text โ€” capture it to target subsequent node-creation calls.


rename_canvas โ€‹

Rename an existing canvas tab.

ParameterTypeRequiredDescription
canvas_idstringโœ“ID from list_canvases
namestringโœ“New display name

switch_canvas โ€‹

Switch the active canvas tab.

ParameterTypeRequiredDescription
canvas_idstringโœ“ID from list_canvases

remove_canvas โ€‹

Delete a canvas tab and all its nodes.

ParameterTypeRequiredDescription
canvas_idstringโœ“ID from list_canvases

Node creation โ€‹

add_query_node โ€‹

Add a SQL query node to the canvas.

ParameterTypeRequiredDescription
namestringโœ“Display label for the node
sqlstringโœ“SQL to populate the node
canvas_idstringTarget canvas tab (default: active canvas)

Returns a node ID โ€” pass it as source_id to add_chart_node.


add_chart_node โ€‹

Add a chart node that visualizes query results.

ParameterTypeRequiredDescription
namestringโœ“Display label
chart_typestringโœ“See chart types below
x_columnstringโœ“Column for the X axis (or labels for pie/donut)
y_columnstringโœ“Column for the Y axis (or values for pie/donut)
source_idstringNode ID of a query/data node to source data from
sqlstringInline SQL (alternative to source_id)
color_columnstringColumn to use for color grouping
label_columnstringColumn to use for point labels
canvas_idstringTarget canvas tab (default: active canvas)

Chart types:

chart_typeLabelColumns needed
barYBar (vertical)X: category or time ยท Y: numeric
barXBar (horizontal)X: numeric ยท Y: category
lineYLineX: time or sequential ยท Y: numeric
areaYAreaX: time or sequential ยท Y: numeric
dotScatterX: numeric ยท Y: numeric
cellCell gridX: category ยท Y: category ยท Color: numeric
piePieX: label column ยท Y: value column
donutDonutX: label column ยท Y: value column
histogramHistogramX: numeric column to bin
boxplotBox plotX: category (group) ยท Y: numeric
sankeySankeyX: source column ยท Y: target column ยท Color: value column
waterfallWaterfallX: category ยท Y: numeric (positive = gain, negative = loss)
heatmapHeatmapX: column ยท Y: row ยท Color: numeric value
scatter-matrixScatter matrixX/Y: two or more numeric columns
numberBig numberFirst row ยท first numeric column
booleanStatus badgeFirst row ยท first boolean-like column
conditionalConditionalAny column ยท rules evaluated top-to-bottom
mermaidMermaid diagramNo data โ€” write diagram syntax directly in chart SQL field
tableTableAll result columns shown (configurable per-column)

add_markdown_node โ€‹

Add a freeform markdown text node.

ParameterTypeRequiredDescription
namestringโœ“Title shown in the node header
contentstringโœ“Markdown body
canvas_idstringTarget canvas tab (default: active canvas)

add_section โ€‹

Add a named section container to the canvas. Sections appear behind other nodes and are useful for grouping.

ParameterTypeRequiredDescription
namestringโœ“Section label
widthnumberWidth in canvas pixels (default: 400)
heightnumberHeight in canvas pixels (default: 300)
canvas_idstringTarget canvas tab (default: active canvas)

add_ingest_node โ€‹

Add a Generator or Ingestion node โ€” a node that produces or fetches data on a schedule.

Generator mode runs a DML SQL statement (INSERT, UPDATE, etc.) against DuckDB on a timer. Good for synthetic live data, simulations, or any workload that generates rows using DuckDB functions (now(), random(), gen_random_uuid()).

Ingestion mode fetches a URL on a schedule and appends or replaces a target table. Requires the desktop app (Go-side fetch bypasses CORS).

ParameterTypeRequiredDescription
namestringโœ“Display label for the node
modestringgenerator or ingestion (default: generator)
sqlstringGenerator mode: DML SQL to run on each tick
urlstringIngestion mode: URL to fetch (CSV / Parquet / JSON)
target_tablestringIngestion mode: DuckDB table to write into
conflict_modestringappend or replace (default: append)
intervalnumberRun interval in seconds; fractional values for sub-second (e.g. 0.25 = 250 ms). 0 = manual only
canvas_idstringTarget canvas tab (default: active canvas)

add_exercise_node โ€‹

Create a self-contained exercise node with an embedded SQL editor and validator. Students write SQL directly inside the card and press Run to check their work against educator-defined checks. Chain multiple exercises together with next_id to build a guided lesson flow. Checks (set_match, row_count, non_empty, no_nulls, column_value, column_exists, sql_pattern) are configured interactively in the node's Edit mode after creation.

ParameterTypeRequiredDescription
namestringโœ“Name for the node (e.g. ex1_select_basics) โ€” used as a stable ID
sqlstringStarter SQL pre-filled in the student's editor (e.g. SELECT ??? FROM products)
promptstringMarkdown prompt shown to the student describing the exercise
success_textstringMarkdown revealed when all checks pass โ€” use for explanations, encouragement, or hints
next_idstringNode ID of the next exercise; shows a Next โ†’ button when this exercise passes
canvas_idstringTarget canvas tab (default: active canvas)

Example:

json
{
  "name": "ex1_select_all",
  "sql": "SELECT ??? FROM products",
  "prompt": "Write a SELECT query that returns **all rows** from the `products` table.",
  "success_text": "Nice work! `SELECT *` is the simplest way to fetch every column.",
  "next_id": "mcp_ex2_where_clause"
}

add_test_node โ€‹

Create a TestNode that runs a SQL query on a schedule or manually and validates the result against configured checks. Use for data quality monitoring โ€” automated assertions against pipeline outputs, row count guards, freshness checks.

ParameterTypeRequiredDescription
namestringโœ“Name for the node
sqlstringSQL query to run as the test
intervalnumberAuto-run interval in seconds; 0 = manual only (default)
canvas_idstringTarget canvas tab (default: active canvas)

Example:

json
{
  "name": "orders_not_empty",
  "sql": "SELECT COUNT(*) AS n FROM orders",
  "interval": 60
}

Node manipulation โ€‹

update_query_node โ€‹

Edit an existing query node's SQL or display name in place.

ParameterTypeRequiredDescription
node_idstringโœ“ID from list_canvas_nodes
sqlstringNew SQL (omit to keep current)
namestringNew display name (omit to keep current)

move_node โ€‹

Move a node to a new position on the canvas.

ParameterTypeRequiredDescription
node_idstringโœ“ID from list_canvas_nodes
xnumberโœ“New X position (canvas units)
ynumberโœ“New Y position (canvas units)

resize_node โ€‹

Resize a node.

ParameterTypeRequiredDescription
node_idstringโœ“ID from list_canvas_nodes
widthnumberโœ“New width in canvas pixels
heightnumberโœ“New height in canvas pixels

set_node_color โ€‹

Set the accent color for any node's header.

ParameterTypeRequiredDescription
node_idstringโœ“ID from list_canvas_nodes
colorstringโœ“Hex color, e.g. #18b569

focus_node โ€‹

Pan and zoom the canvas viewport to center on a specific node.

ParameterTypeRequiredDescription
node_idstringโœ“ID from list_canvas_nodes

Import tools โ€‹

import_file โ€‹

Import a local file into DuckDB and add it to the canvas as a table node.

ParameterTypeRequiredDescription
pathstringโœ“Absolute path to a CSV, Parquet, or JSON file
table_namestringโœ“DuckDB table name to register
canvas_idstringTarget canvas tab (default: active canvas)

import_url โ€‹

Fetch a remote data file server-side and load it into DuckDB. Bypasses browser CORS restrictions entirely.

ParameterTypeRequiredDescription
urlstringโœ“Public URL to a CSV, Parquet, or JSON file
table_namestringโœ“DuckDB table name to register
canvas_idstringTarget canvas tab (default: active canvas)

import_s3 โ€‹

Load a file from S3, Cloudflare R2, or MinIO into DuckDB. Requires S3 credentials configured in Settings โ†’ S3 Storage.

ParameterTypeRequiredDescription
s3_urlstringโœ“s3://bucket/path/to/file.parquet
table_namestringโœ“DuckDB table name to register
canvas_idstringTarget canvas tab (default: active canvas)

import_csv_data โ€‹

Import raw CSV text directly as a DuckDB table โ€” no file needed.

ParameterTypeRequiredDescription
csv_textstringโœ“Raw CSV content (header row required)
table_namestringโœ“DuckDB table name to register
canvas_idstringTarget canvas tab (default: active canvas)

Canvas utilities โ€‹

fit_view โ€‹

Zoom and pan the canvas viewport.

ParameterTypeRequiredDescription
modestringfit = zoom to fit all content (default) ยท reset = set zoom to 100%

clear_canvas โ€‹

Remove all nodes from a canvas. Does not drop DuckDB tables.

ParameterTypeRequiredDescription
canvas_idstringCanvas to clear (default: active canvas)

Released under the GPL v3 License.