spelunk-mcp
v0.2.1A multi-source DuckDB query + transformation-pipeline MCP server.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
query Query
Run read-only DuckDB SELECTs over sources and saved results, storing each full result (no row cap) as a named table in the flow for immediate reuse. Two modes: single (`sql` + `name`) or batch (`steps=[{sql, name}, ...]`). ALWAYS prefer one batch call over sequential single calls: steps run in list order and a later step may reference an earlier step's `name` like any saved result. Batch is not only for pipelines — the steps can be a dependent chain, a bundle of unrelated queries, or a mix; batch whenever you want more than one result in one round trip. Fail-fast — completed steps stay mat…
| Parameter | Type | Description |
|---|---|---|
flow | string | |
name | ||
sql | ||
steps |
profile Profile
Run a SELECT and return per-column statistics over the full result, computed in DuckDB. Numerics: non_null_count, null_rate, min, max, mean, std, p25/p50/p75/p95. Text: non_null_count, null_rate, unique, top, freq. No row cap.
| Parameter | Type | Description |
|---|---|---|
sql * | string | |
flow | string |
export Export
Write a saved result (by name, e.g. `joined` or "src"."orders") OR a full SELECT to a file. Formats: csv, json, parquet. Parent directories are created. No row cap.
| Parameter | Type | Description |
|---|---|---|
format * | string | |
path * | string | |
target * | string | |
flow | string |
catalog Catalog
With no argument: list active flows and how many results each holds. With a flow: list that flow's saved results with their columns, types, row counts, and the one-line plain-English description recorded for each (null if none).
| Parameter | Type | Description |
|---|---|---|
flow |
drop Drop
Delete a saved result (give `name`) or an entire flow and all its results (give only `flow`). Idempotent; cannot drop reserved schemas.
| Parameter | Type | Description |
|---|---|---|
flow | string | |
name |
lineage Lineage
Show how results were built: the SQL and dependency edges behind them. With `name`, return the upstream closure that produced that result (the node plus every result it transitively depends on, across flows); with no `name`, the whole flow. Returns nodes (name, kind, description, sql, deps, sources, created_at), edges, a dependency-first `order`, and `missing` (deps whose lineage is gone). `description` is a one-line, plain-English label (null if none was given). Pass `render='mermaid'` (or `'dot'`) to also get a ready-to-display diagram string (under that key) built deterministically from the…
| Parameter | Type | Description |
|---|---|---|
flow | string | |
name | ||
path | ||
render |
replay Replay
Rebuild a flow's results from their recorded SQL, in dependency order — re-running each `query`. External inputs (sources, cross-flow results) must already exist; they are read, not rebuilt. With `into`, rebuild into a fresh flow (non-destructive — e.g. re-run the pipeline against updated source files, then compare); without it, refresh in place. `dry_run=true` returns the ordered plan without executing. Errors on a dependency cycle.
| Parameter | Type | Description |
|---|---|---|
dry_run | boolean | |
flow | string | |
into |