databricks-advanced-mcp

v0.0.7
databricks-advanced-mcp Checked 2 days ago Published 9 months ago

Advanced MCP server for Databricks workspace intelligence — dependency scanning, impact analysis, notebook review, and job/pipeline operations.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

execute_query Execute Query

Execute a SQL query against a Databricks SQL warehouse. Runs any SQL statement (SELECT, DDL, DML) and returns structured results. Results are limited to the specified maximum row count.

ParameterTypeDescription
query *stringSQL query to execute.
limitintegerMaximum number of rows to return (default: 1000).

get_table_info Get Table Info

Get detailed metadata for a Databricks table. Returns schema (columns with types/nullability), row count, table properties, storage location, and table type.

ParameterTypeDescription
table_name *stringName of the table.
catalogCatalog name (defaults to DATABRICKS_CATALOG env var).
schemaSchema/database name (defaults to DATABRICKS_SCHEMA env var).

list_tables List Tables

List all tables in a Databricks catalog and schema. Returns table names, types, and comments.

ParameterTypeDescription
catalogCatalog name (defaults to DATABRICKS_CATALOG env var).
schemaSchema/database name (defaults to DATABRICKS_SCHEMA env var).

scan_notebook Scan Notebook

Scan a Databricks notebook for table references. Fetches the notebook source via Workspace API, parses SQL cells and PySpark code, and returns all table references found.

ParameterTypeDescription
notebook_path *stringWorkspace path to the notebook (e.g. /Workspace/Users/me/my_notebook).

scan_jobs Scan Jobs

Scan all Databricks jobs to extract table dependencies. Lists all jobs via the Jobs API, inspects task definitions (notebook tasks, SQL tasks, DLT pipeline tasks), and extracts table references from associated notebooks and SQL statements.

scan_dlt_pipelines Scan Dlt Pipelines

Scan all DLT pipelines to extract table dependencies. Retrieves pipeline definitions via the Pipelines API and extracts source/target table references from configuration and associated notebooks.

scan_dlt_pipeline Scan Dlt Pipeline

Scan a single DLT pipeline to extract table dependencies. Retrieves the pipeline definition by ID and extracts source/target table references from configuration and associated notebooks.

ParameterTypeDescription
pipeline_id *stringThe ID of the DLT pipeline to scan.

build_dependency_graph Build Dependency Graph

Build the workspace dependency graph. Orchestrates scanning of all notebooks, jobs, and DLT pipelines to build a unified directed acyclic graph. Results are cached.

ParameterTypeDescription
pathstringNotebook path prefix when scope="path" (e.g. "/Workspace/Repos/team/project"). Ignored when scope="workspace".
scopestringScan scope — "workspace" (full scan, default) or "path" (scoped to a notebook path prefix).

get_table_dependencies Get Table Dependencies

Get upstream and downstream dependencies for a table. Queries the cached dependency graph to find all assets that produce (upstream) or consume (downstream) the given table.

ParameterTypeDescription
table_name *stringFully-qualified table name (catalog.schema.table).

refresh_graph Refresh Graph

Invalidate and rebuild the dependency graph cache. Forces a full rebuild of the dependency graph regardless of cache TTL status.

analyze_impact Analyze Impact

Analyze the impact of a proposed change on downstream assets. Traverses the dependency graph to identify all affected assets and generates a structured impact report with severity levels and remediation suggestions.

ParameterTypeDescription
change_type *stringType of change — "column_drop", "schema_change", or "pipeline_failure".
column_namestringColumn being dropped (required for column_drop).
pipeline_idstringPipeline or job ID (required for pipeline_failure).
schema_changesstringJSON array of changes for schema_change, e.g. [{"action":"remove","column":"col1"}].
table_namestringTarget table (required for column_drop and schema_change).

review_notebook Review Notebook

Review a Databricks notebook for issues and optimization opportunities. Fetches the notebook source, analyzes each code cell against performance rules, coding standards, and optimization suggestions, then returns structured findings.

ParameterTypeDescription
notebook_path *stringWorkspace path to the notebook.
categoriesstringComma-separated categories to check: "performance", "standards", "optimization", or "all" (default).

list_jobs List Jobs

List all Databricks jobs with status and schedule.

ParameterTypeDescription
name_filterstringOptional name substring to filter jobs (case-insensitive).

get_job_status Get Job Status

Get detailed run status and errors for a specific job.

ParameterTypeDescription
job_id *stringThe Databricks job ID.

list_pipelines List Pipelines

List all DLT pipelines with state and latest update status.

ParameterTypeDescription
name_filterstringOptional name substring to filter pipelines.

get_pipeline_status Get Pipeline Status

Get detailed status and recent events for a DLT pipeline.

ParameterTypeDescription
pipeline_id *stringThe DLT pipeline ID.

trigger_rerun Trigger Rerun

Trigger a rerun of a failed or completed job. This is a MUTATING operation. When confirm=False (default), returns a preview of what would happen. Set confirm=True to actually trigger the rerun.

ParameterTypeDescription
job_id *stringThe Databricks job ID to rerun.
confirmbooleanSet to True to actually trigger the rerun.

trigger_job_run Trigger Job Run

Trigger a new run of a Databricks job (run now). Unlike trigger_rerun (which repairs the latest failed run), this tool starts a fresh new run of the job — useful for scheduled jobs, manual triggers, or testing with different parameters. This is a MUTATING operation. When confirm=False (default), returns a preview. Set confirm=True to actually trigger the run.

ParameterTypeDescription
job_id *stringThe Databricks job ID to run.
confirmbooleanSet to True to actually trigger the run.
job_parametersstringJSON string of key-value pairs to pass as job parameters, e.g. '{"env": "prod", "date": "2026-03-04"}'. Defaults to empty dict (use job defaults).

list_workspace_notebooks List Workspace Notebooks

List all notebooks in a Databricks workspace path. Recursively traverses the workspace directory tree and returns all notebooks found, with their paths, names, and languages.

ParameterTypeDescription
max_depthintegerMaximum directory depth to recurse (default: 10).
pathstringWorkspace path to list from (default: "/").

create_job Create Job

Create a new Databricks job with a notebook task. This is a MUTATING operation. When confirm=False (default), returns a preview of what would be created. Set confirm=True to actually create the job.

ParameterTypeDescription
name *stringName for the new job.
notebook_path *stringWorkspace path to the notebook to run.
confirmbooleanSet to True to actually create the job.
cron_expressionstringOptional Quartz cron expression for scheduling (e.g. "0 0 0 * * ?" for daily at midnight).
existing_cluster_idstringID of an existing cluster to use. If empty, the job will use a new job cluster (serverless or default).
timezonestringTimezone for the cron schedule (default: "UTC").

create_notebook Create Notebook

Create a new notebook in the Databricks workspace. This is a MUTATING operation. When confirm=False (default), returns a preview of what would be created. Set confirm=True to actually create the notebook.

ParameterTypeDescription
path *stringWorkspace path for the new notebook (e.g. "/Workspace/dev/my_notebook").
confirmbooleanSet to True to actually create the notebook.
contentstringOptional initial content for the notebook.
languagestringNotebook language: PYTHON, SQL, SCALA, or R.
overwritebooleanWhether to overwrite if a notebook exists at the path (default: False).

workspace_upload Workspace Upload

Upload a local file to a Databricks workspace path. Auto-detects notebook format from file extension (.py, .sql, .scala, .r → SOURCE; .ipynb → JUPYTER; others → AUTO). This is a MUTATING operation. When confirm=False (default), returns a preview. Set confirm=True to upload.

ParameterTypeDescription
local_path *stringPath to the local file to upload.
workspace_path *stringTarget workspace path (e.g. "/Workspace/uploads/etl.py").
confirmbooleanSet to True to actually upload the file.
overwritebooleanWhether to overwrite if an object exists at the path (default: False).

read_notebook Read Notebook

Read/export the content of a Databricks notebook.

ParameterTypeDescription
notebook_path *stringWorkspace path to the notebook (e.g. "/Workspace/Users/me/my_notebook").
formatstringExport format — "SOURCE" (default), "HTML", or "JUPYTER".

delete_workspace_item Delete Workspace Item

Delete a notebook, file, or folder from the Databricks workspace. This is a DESTRUCTIVE operation. When confirm=False (default), returns a preview. Set confirm=True to delete.

ParameterTypeDescription
path *stringWorkspace path to the object to delete.
confirmbooleanSet to True to actually delete.
recursivebooleanIf True and path is a directory, delete all contents recursively. Required for non-empty directories.

get_workspace_status Get Workspace Status

Get metadata for a workspace object (notebook, directory, file, etc.).

ParameterTypeDescription
path *stringWorkspace path to the object (e.g. "/Workspace/Users/me/my_notebook").

list_catalogs List Catalogs

List all Unity Catalog catalogs accessible to the current principal.

list_schemas List Schemas

List all schemas in a Unity Catalog catalog.

ParameterTypeDescription
catalog *stringName of the catalog to list schemas from.

describe_schema Describe Schema

Get detailed metadata for a Unity Catalog schema.

ParameterTypeDescription
catalog *stringName of the parent catalog.
schema *stringName of the schema to describe.

create_schema Create Schema

Create a new schema in a Unity Catalog catalog. This is a MUTATING operation. When confirm=False (default), returns a preview. Set confirm=True to create.

ParameterTypeDescription
catalog *stringName of the parent catalog.
schema *stringName of the schema to create.
commentstringOptional description for the schema.
confirmbooleanSet to True to actually create the schema.

drop_schema Drop Schema

Drop a schema from a Unity Catalog catalog. The schema must be empty (no tables, views, or volumes). This is a DESTRUCTIVE operation. When confirm=False (default), returns a preview. Set confirm=True to drop.

ParameterTypeDescription
catalog *stringName of the parent catalog.
schema *stringName of the schema to drop.
confirmbooleanSet to True to actually drop the schema.

list_clusters List Clusters

List all Databricks clusters with state, creator, and node type.

ParameterTypeDescription
name_filterstringOptional substring filter — only clusters whose name contains this string (case-insensitive) are returned.

get_cluster_status Get Cluster Status

Get detailed status and configuration for a Databricks cluster.

ParameterTypeDescription
cluster_id *stringThe ID of the cluster to inspect.

start_cluster Start Cluster

Start a terminated Databricks cluster. This is a MUTATING operation. When confirm=False (default), returns a preview. Set confirm=True to start.

ParameterTypeDescription
cluster_id *stringThe ID of the cluster to start.
confirmbooleanSet to True to actually start the cluster.

stop_cluster Stop Cluster

Stop (terminate) a running Databricks cluster. This is a MUTATING operation. When confirm=False (default), returns a preview. Set confirm=True to stop.

ParameterTypeDescription
cluster_id *stringThe ID of the cluster to stop.
confirmbooleanSet to True to actually stop the cluster.

restart_cluster Restart Cluster

Restart a running Databricks cluster. This is a MUTATING operation. When confirm=False (default), returns a preview. Set confirm=True to restart.

ParameterTypeDescription
cluster_id *stringThe ID of the cluster to restart.
confirmbooleanSet to True to actually restart the cluster.

list_warehouses List Warehouses

List all SQL warehouses with state, size, and type.

ParameterTypeDescription
name_filterstringOptional substring filter — only warehouses whose name contains this string (case-insensitive) are returned.

get_warehouse_status Get Warehouse Status

Get detailed status and configuration for a SQL warehouse.

ParameterTypeDescription
warehouse_id *stringThe ID of the SQL warehouse to inspect.

start_warehouse Start Warehouse

Start a stopped SQL warehouse. This is a MUTATING operation. When confirm=False (default), returns a preview. Set confirm=True to start.

ParameterTypeDescription
warehouse_id *stringThe ID of the SQL warehouse to start.
confirmbooleanSet to True to actually start the warehouse.

stop_warehouse Stop Warehouse

Stop a running SQL warehouse. This is a MUTATING operation. When confirm=False (default), returns a preview. Set confirm=True to stop.

ParameterTypeDescription
warehouse_id *stringThe ID of the SQL warehouse to stop.
confirmbooleanSet to True to actually stop the warehouse.

list_volumes List Volumes

List Unity Catalog volumes in a given catalog and schema.

ParameterTypeDescription
catalog *stringName of the catalog.
schema *stringName of the schema.

get_volume_info Get Volume Info

Get detailed metadata for a Unity Catalog volume.

ParameterTypeDescription
catalog *stringName of the parent catalog.
schema *stringName of the parent schema.
volume_name *stringName of the volume.

list_volume_files List Volume Files

List files and directories inside a Unity Catalog volume.

ParameterTypeDescription
volume_path *stringPath inside the volume using the Volumes path format, e.g. "/Volumes/catalog/schema/volume_name" or "/Volumes/catalog/schema/volume_name/subdir".

read_volume_file Read Volume File

Read the contents of a file from a Unity Catalog volume. Reads up to max_bytes of the file. For binary files, returns base64-encoded content.

ParameterTypeDescription
volume_path *stringFull path to the file, e.g. "/Volumes/catalog/schema/volume/file.csv".
max_bytesintegerMaximum number of bytes to read (default: 1 MB).