list_job_runs
Retrieve the execution history of a Databricks job to monitor its performance and track past runs for analysis.
Instructions
List job run history
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | ||
| limit | No |
Implementation Reference
- tools/jobs.py:30-47 (handler)Implementation of the list_job_runs MCP tool which fetches job run history for a given job_id.
def list_job_runs(ctx: Context, job_id: int, limit: int = 10) -> List[Dict[str, Any]]: """List job run history""" w = get_workspace_client() runs_iter = w.jobs.list_runs(job_id=job_id, expand_tasks=False) results = [] for i, run in enumerate(runs_iter): if i >= limit: break run_d = run.as_dict() results.append({ "run_id": run_d.get("run_id"), "job_id": run_d.get("job_id"), "state": run_d.get("state"), "start_time": run_d.get("start_time"), "end_time": run_d.get("end_time"), "run_page_url": run_d.get("run_page_url") }) return results