Skip to main content

At a glance

Credentials

Set these per environment. See Connect an integration.
VariableRequiredDescription
DATABRICKS_TOKENYesDatabricks personal access token (generated under Settings > Developer > Access tokens) Docs.
DATABRICKS_HOSTYesDatabricks workspace host, e.g. dbc-a1b2345c-d6e7.cloud.databricks.com or adb-1234567890123456.7.azuredatabricks.net (no protocol)

Setup

  1. Get a workspace: If you don’t have one, sign up for the Databricks Free Edition at https://www.databricks.com/learn/free-edition, or use an existing workspace on AWS, Azure, or GCP.
  2. Find your workspace host: Copy the hostname from your workspace URL, e.g. dbc-a1b2345c-d6e7.cloud.databricks.com (AWS/GCP) or adb-1234567890123456.7.azuredatabricks.net (Azure). Set it as DATABRICKS_HOST (no https://).
  3. Generate a personal access token: In the workspace, click your username > Settings > Developer, click Manage next to Access tokens, then Generate new token. Name it, set a lifetime, and copy the token immediately.
  4. Store the credentials: Add DATABRICKS_TOKEN=<your token> and DATABRICKS_HOST=<your workspace host> to your .env file.
  5. Verify access: Run the List SQL Warehouses tool. A 401/403 means the token is invalid or expired, or token-based auth is disabled by your workspace admin.
  • Personal access tokens are workspace-scoped - the token only works against the workspace host where it was created
  • Executing SQL requires a running (or auto-starting) SQL warehouse; the first query may take a minute while the warehouse starts
  • Databricks recommends OAuth over PATs for production use; PATs are the simplest option for getting started
  • Tokens can expire - if calls suddenly return 403, regenerate the token
Provider API reference: https://docs.databricks.com/api/workspace/introduction

Tools

ToolAccessDescription
List ClustersReadList all-purpose and job compute clusters in the workspace with their state and configuration
List JobsReadList jobs defined in the workspace, optionally filtered by name
Run Job NowWriteTrigger an immediate run of an existing job, optionally overriding job parameters
List Job RunsReadList recent job runs, optionally filtered to one job or to active/completed runs
Cancel Job RunWriteCancel a job run; the cancellation happens asynchronously, so the run may still be running briefly
Get Job RunReadGet the status, timing, and task results of a job run (use the run_id returned by Run Job Now)
Execute SQL StatementWriteExecute a SQL query against a SQL warehouse and return the result rows (queries; the warehouse enforces table permissions)
Get SQL StatementReadPoll the status and result of a previously submitted SQL statement, e.g. after an async or timed-out execution
List SQL WarehousesReadList SQL warehouses in the workspace to find a warehouse_id for executing SQL statements

Example prompts

  • List my Databricks SQL warehouses, then run a SQL query I provide against one of them and summarize the results.
  • List my Databricks jobs and check the status of their most recent runs.
  • Show me the clusters in my Databricks workspace and which ones are currently running.