query_databricks
Run read-only SQL queries against a Databricks pipeline's destination to verify loaded data or discover schemas and tables; omit SQL to preview the target table.
Instructions
Run a read-only query against the Databricks workspace a pipeline loads into. Pass the pipeline name; the server resolves the workspace, credentials, SQL warehouse, and catalog from the pipeline's config — same connection the loader uses, credentials never leave the server. Only works for pipelines whose destination is Databricks (database with useDatabricks=true). Allowed statements: SELECT (WITH/CTE), SHOW, and DESCRIBE — LIMIT is auto-appended to SELECTs. Omit sql to preview the pipeline's destination table (the 'did my load land?' check). Metadata discovery uses the same tool — there are no separate list_databricks_* tools: SHOW CATALOGS, SHOW SCHEMAS IN <catalog>, SHOW TABLES IN <catalog>.<schema>, DESCRIBE TABLE <catalog>.<schema>.<table>, or query .information_schema.columns. Queries run on the customer's SQL warehouse (which costs them compute) — keep them targeted and let the default LIMIT stand unless the user asks for more. If the warehouse is stopped, the first query auto-starts it and may take longer.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pipeline": "<pipeline>"
},
"name": "query_databricks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | No | Read-only statement: SELECT/WITH, SHOW, or DESCRIBE. Omit to preview the pipeline's destination table. | |
| limit | No | Maximum rows to return (default: 100). Pass -1 for unlimited. | |
| pipeline | Yes | Pipeline name (from list_pipelines). Must have a Databricks destination. |