Tools
The tools, by group.
Discovery
| Tool | What it does |
|---|---|
list_catalogs | Catalogs available to you, with table counts and sizes |
get_catalog_context | Start here once you know the catalog — tables, keys, declared joins with cardinality, inferred join hints per column, column meanings and measures in one call |
list_schemas | Schemas in one catalog |
list_tables | Tables in a schema, with row counts, sizes and formats |
describe_table | Columns, column meanings, keys and layout for one table, with up to 10 sample rows |
get_table_semantics | What a table’s columns mean — see Column meanings |
Query
| Tool | What it does |
|---|---|
estimate_query_cost | Plans and prices SQL without running it |
execute_query | Runs SQL and returns rows; dry_run=True returns the plan, estimate and a budget preview instead |
Long-running work
| Tool | What it does |
|---|---|
get_query_status | State, progress and error for a submitted query |
get_query_results | Pages a completed query’s stored result |
cancel_query | Cancels a queued or running query and refunds its reserved budget |
export_query_results | Writes the full result to Parquet or CSV, returns a time-limited link |
History and performance
| Tool | What it does |
|---|---|
list_query_history | Past runs, filtered by date, status and owner, sorted by runtime, CPU time or peak memory |
get_query_profile | How one run spent its time: tier, startup vs engine, CPU utilization, spill, bytes per row, slowest operators, and each scan’s filters |
Pipelines
| Tool | What it does |
|---|---|
list_pipelines | dbt projects with schedule, next run, last status, repo_id and thunderduck.yml errors |
sync_project | Picks up a merged default branch now instead of waiting for the ten-minute sync |
run_branch | Runs a pushed branch’s dbt code into a schema named after the branch, in the mapped dev catalog |
get_pipeline_run | A pipeline or branch run’s status, steps and per-model results |
get_freshness | For every model with a freshness rule: when it last built in production, its age, and ok / warn / error / unknown |
Syncs
| Tool | What it does |
|---|---|
list_syncs | Postgres tables copied into an Iceberg catalog: source table, destination table, schedule, next run, last status and watermark |
get_sync_runs | One sync’s recent runs: trigger, status, the key range or cursor bounds read, rows, bytes, duration and the error when one failed |
run_sync | Starts one run now instead of waiting for the schedule; needs the query:write scope and a company admin |
A synced table lives in the destination catalog’s default namespace
(<catalog>.default.<table>), so query and join it like any other table. The
console’s Syncs page and its alert kinds (sync_failed, sync_lag,
sync_overlap, sync_drift) report the same runs.
Scheduling and output
| Tool | What it does |
|---|---|
create_scheduled_job | Schedules SQL on a cron schedule, owned by you, and returns the job with its next run |
save_artifact | Saves a Markdown report as a shareable artifact in the console |
create_scheduled_job takes a name, the sql, a five-field cron_expr
(0 6 * * * is 06:00 every day) and an optional IANA timezone (default
UTC). The SQL goes through the same checks as execute_query, file exports
included: SQL it would refuse, or a query over the per-query cost cap, is
refused. The job runs with your catalog access. It needs the
query:write scope. Manage the job afterwards on the console’s
Scheduled Jobs page.
save_artifact takes a title, the complete Markdown content and an optional
question. The artifact starts private to the caller; company, role and person
grants are added on its page, which also prints to PDF. On a connection without
console-api access it returns unavailable.
Resources
Clients that browse resources/list instead of calling tools get the same
discovery data:
| Resource | Same as |
|---|---|
thunderduck://catalogs | list_catalogs |
thunderduck://{catalog}/{schema}/{table} | describe_table |
thunderduck://semantics/{catalog}/{schema}/{table} | get_table_semantics |
thunderduck://context/{catalog} | get_catalog_context |
thunderduck://semantic-models/{catalog} | the catalog’s Apache Ossie model |
Annotations
Every tool declares a title and three hints, so a client can tell a metadata lookup from a statement that could modify data:
| Tool | readOnly | destructive | openWorld |
|---|---|---|---|
list_catalogs | ✔ | ✘ | false |
get_catalog_context | ✔ | ✘ | false |
list_schemas / list_tables / describe_table | ✔ | ✘ | true |
get_table_semantics | ✔ | ✘ | false |
estimate_query_cost | ✔ | ✘ | true |
execute_query | ✘ | true | true |
get_query_status / get_query_results | ✔ | ✘ | false |
cancel_query / export_query_results | ✘ | ✘ | false |
list_query_history / get_query_profile | ✔ | ✘ | false |
list_pipelines / get_pipeline_run / get_freshness | ✔ | ✘ | false |
list_syncs / get_sync_runs | ✔ | ✘ | false |
sync_project | ✘ | ✘ | false |
run_branch | ✘ | ✘ | true |
run_sync | ✘ | ✘ | true |
create_scheduled_job | ✘ | ✘ | true |
save_artifact | ✘ | ✘ | false |
openWorld is true for anything that reaches a customer-registered system,
false for tools that only touch Thunderduck’s own registry, stored results or
annotations.
execute_query is marked destructive because a write-scoped token can run
DELETE, DROP and ALTER — the annotation describes what the tool can do
for its most privileged caller, not what a typical call does.
run_branch and create_scheduled_job are not destructive because neither can
write outside a branch’s dev schema or past the guard the statement would face
anyway. run_sync is not destructive because its write is an insert guarded on
the primary key: it never drops or overwrites rows, so re-reading is how a gap
is repaired.