list_jobs
Retrieve and monitor Databricks Jobs to track execution status and manage workflows within the Databricks platform.
Instructions
List Jobs
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_jobs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| expand_tasks | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- tools/jobs.py:9-19 (handler)The list_jobs tool handler which uses the workspace client to retrieve a list of jobs, limited by the provided argument.
@mcp.tool def list_jobs(ctx: Context, limit: int = 20, expand_tasks: bool = False) -> List[Dict[str, Any]]: """List Jobs""" w = get_workspace_client() jobs_iter = w.jobs.list(expand_tasks=expand_tasks) results = [] for i, job in enumerate(jobs_iter): if i >= limit: break results.append(job.as_dict()) return results