list_warehouses
Retrieve a list of available SQL warehouses for querying data and managing analytics workloads in Databricks.
Instructions
List SQL Warehouses
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_warehouses"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- tools/compute.py:84-87 (handler)The handler function `list_warehouses` that lists Databricks SQL Warehouses. Note that while the @mcp.tool decorator appears to be missing for this specific function in the provided code, it is intended to be an MCP tool.
def list_warehouses(ctx: Context) -> List[Dict[str, Any]]: """List SQL Warehouses""" w = get_workspace_client() return [wh.as_dict() for wh in w.warehouses.list()]