Compute & Workspace
Execute code on Databricks compute, manage clusters and warehouses, and upload files to the workspace.
Example prompts
Section titled “Example prompts”“Run this Python script on serverless compute”
“Create a single-node cluster with the latest ML runtime”
“Upload my local project folder to the workspace”
execute_code
Section titled “execute_code”Description: Execute code on Databricks via serverless or cluster compute.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
code | str | No | — |
file_path | str | No | — |
compute_type | str | No | — |
cluster_id | str | No | — |
context_id | str | No | — |
language | str | No | — |
timeout | int | No | — |
destroy_context_on_completion | bool | No | — |
workspace_path | str | No | — |
run_name | str | No | — |
job_extra_params | Dict[str, Any] | No | — |
list_compute
Section titled “list_compute”Description: List compute resources: clusters, node types, or spark versions.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
resource | str | No | — |
cluster_id | str | No | — |
auto_select | bool | No | — |
manage_cluster
Section titled “manage_cluster”Description: Create, modify, start, terminate, or delete a cluster.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
action | str | Yes | — |
cluster_id | str | No | — |
name | str | No | — |
num_workers | int | No | — |
spark_version | str | No | — |
node_type_id | str | No | — |
autotermination_minutes | int | No | — |
data_security_mode | str | No | — |
spark_conf | str | No | — |
autoscale_min_workers | int | No | — |
autoscale_max_workers | int | No | — |
manage_sql_warehouse
Section titled “manage_sql_warehouse”Description: Create, modify, or delete a SQL warehouse.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
action | str | Yes | — |
warehouse_id | str | No | — |
name | str | No | — |
size | str | No | — |
min_num_clusters | int | No | — |
max_num_clusters | int | No | — |
auto_stop_mins | int | No | — |
warehouse_type | str | No | — |
enable_serverless | bool | No | — |
manage_workspace
Section titled “manage_workspace”Description: Manage active Databricks workspace connection (session-scoped).
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
action | str | Yes | — |
profile | Optional[str] | No | — |
host | Optional[str] | No | — |
manage_workspace_files
Section titled “manage_workspace_files”Description: Manage workspace files: upload, delete.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
action | str | Yes | — |
workspace_path | str | Yes | — |
local_path | Optional[str] | No | — |
max_workers | int | No | — |
overwrite | bool | No | — |
recursive | bool | No | — |