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.
| Parameter | Type | Required | Description |
|---|---|---|---|
sql | string | โ | 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
sql | string | โ | SQL to execute |
table_name | string | โ | Name for the new table |
source_id | string | Node ID of a query node to link for staleness tracking | |
canvas_id | string | Target 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
canvas_id | string | Filter to a specific canvas tab; omit to list all canvases |
Canvas tab management โ
create_canvas โ
Create a new canvas tab and switch to it.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Display 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
canvas_id | string | โ | ID from list_canvases |
name | string | โ | New display name |
switch_canvas โ
Switch the active canvas tab.
| Parameter | Type | Required | Description |
|---|---|---|---|
canvas_id | string | โ | ID from list_canvases |
remove_canvas โ
Delete a canvas tab and all its nodes.
| Parameter | Type | Required | Description |
|---|---|---|---|
canvas_id | string | โ | ID from list_canvases |
Node creation โ
add_query_node โ
Add a SQL query node to the canvas.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | โ | Display label for the node |
sql | string | โ | SQL to populate the node |
canvas_id | string | Target 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | โ | Display label |
chart_type | string | โ | See chart types below |
x_column | string | โ | Column for the X axis (or labels for pie/donut) |
y_column | string | โ | Column for the Y axis (or values for pie/donut) |
source_id | string | Node ID of a query/data node to source data from | |
sql | string | Inline SQL (alternative to source_id) | |
color_column | string | Column to use for color grouping | |
label_column | string | Column to use for point labels | |
canvas_id | string | Target canvas tab (default: active canvas) |
Chart types:
chart_type | Label | Columns needed |
|---|---|---|
barY | Bar (vertical) | X: category or time ยท Y: numeric |
barX | Bar (horizontal) | X: numeric ยท Y: category |
lineY | Line | X: time or sequential ยท Y: numeric |
areaY | Area | X: time or sequential ยท Y: numeric |
dot | Scatter | X: numeric ยท Y: numeric |
cell | Cell grid | X: category ยท Y: category ยท Color: numeric |
pie | Pie | X: label column ยท Y: value column |
donut | Donut | X: label column ยท Y: value column |
histogram | Histogram | X: numeric column to bin |
boxplot | Box plot | X: category (group) ยท Y: numeric |
sankey | Sankey | X: source column ยท Y: target column ยท Color: value column |
waterfall | Waterfall | X: category ยท Y: numeric (positive = gain, negative = loss) |
heatmap | Heatmap | X: column ยท Y: row ยท Color: numeric value |
scatter-matrix | Scatter matrix | X/Y: two or more numeric columns |
number | Big number | First row ยท first numeric column |
boolean | Status badge | First row ยท first boolean-like column |
conditional | Conditional | Any column ยท rules evaluated top-to-bottom |
mermaid | Mermaid diagram | No data โ write diagram syntax directly in chart SQL field |
table | Table | All result columns shown (configurable per-column) |
add_markdown_node โ
Add a freeform markdown text node.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | โ | Title shown in the node header |
content | string | โ | Markdown body |
canvas_id | string | Target 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | โ | Section label |
width | number | Width in canvas pixels (default: 400) | |
height | number | Height in canvas pixels (default: 300) | |
canvas_id | string | Target 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).
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | โ | Display label for the node |
mode | string | generator or ingestion (default: generator) | |
sql | string | Generator mode: DML SQL to run on each tick | |
url | string | Ingestion mode: URL to fetch (CSV / Parquet / JSON) | |
target_table | string | Ingestion mode: DuckDB table to write into | |
conflict_mode | string | append or replace (default: append) | |
interval | number | Run interval in seconds; fractional values for sub-second (e.g. 0.25 = 250 ms). 0 = manual only | |
canvas_id | string | Target 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | โ | Name for the node (e.g. ex1_select_basics) โ used as a stable ID |
sql | string | Starter SQL pre-filled in the student's editor (e.g. SELECT ??? FROM products) | |
prompt | string | Markdown prompt shown to the student describing the exercise | |
success_text | string | Markdown revealed when all checks pass โ use for explanations, encouragement, or hints | |
next_id | string | Node ID of the next exercise; shows a Next โ button when this exercise passes | |
canvas_id | string | Target canvas tab (default: active canvas) |
Example:
{
"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.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | โ | Name for the node |
sql | string | SQL query to run as the test | |
interval | number | Auto-run interval in seconds; 0 = manual only (default) | |
canvas_id | string | Target canvas tab (default: active canvas) |
Example:
{
"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.
| Parameter | Type | Required | Description |
|---|---|---|---|
node_id | string | โ | ID from list_canvas_nodes |
sql | string | New SQL (omit to keep current) | |
name | string | New display name (omit to keep current) |
move_node โ
Move a node to a new position on the canvas.
| Parameter | Type | Required | Description |
|---|---|---|---|
node_id | string | โ | ID from list_canvas_nodes |
x | number | โ | New X position (canvas units) |
y | number | โ | New Y position (canvas units) |
resize_node โ
Resize a node.
| Parameter | Type | Required | Description |
|---|---|---|---|
node_id | string | โ | ID from list_canvas_nodes |
width | number | โ | New width in canvas pixels |
height | number | โ | New height in canvas pixels |
set_node_color โ
Set the accent color for any node's header.
| Parameter | Type | Required | Description |
|---|---|---|---|
node_id | string | โ | ID from list_canvas_nodes |
color | string | โ | Hex color, e.g. #18b569 |
focus_node โ
Pan and zoom the canvas viewport to center on a specific node.
| Parameter | Type | Required | Description |
|---|---|---|---|
node_id | string | โ | 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | โ | Absolute path to a CSV, Parquet, or JSON file |
table_name | string | โ | DuckDB table name to register |
canvas_id | string | Target canvas tab (default: active canvas) |
import_url โ
Fetch a remote data file server-side and load it into DuckDB. Bypasses browser CORS restrictions entirely.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | โ | Public URL to a CSV, Parquet, or JSON file |
table_name | string | โ | DuckDB table name to register |
canvas_id | string | Target 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
s3_url | string | โ | s3://bucket/path/to/file.parquet |
table_name | string | โ | DuckDB table name to register |
canvas_id | string | Target canvas tab (default: active canvas) |
import_csv_data โ
Import raw CSV text directly as a DuckDB table โ no file needed.
| Parameter | Type | Required | Description |
|---|---|---|---|
csv_text | string | โ | Raw CSV content (header row required) |
table_name | string | โ | DuckDB table name to register |
canvas_id | string | Target canvas tab (default: active canvas) |
Canvas utilities โ
fit_view โ
Zoom and pan the canvas viewport.
| Parameter | Type | Required | Description |
|---|---|---|---|
mode | string | fit = zoom to fit all content (default) ยท reset = set zoom to 100% |
clear_canvas โ
Remove all nodes from a canvas. Does not drop DuckDB tables.
| Parameter | Type | Required | Description |
|---|---|---|---|
canvas_id | string | Canvas to clear (default: active canvas) |