Skip to main content
Glama
ChrisChoTW

databricks-mcp

by ChrisChoTW

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
NameRequiredDescriptionDefault
job_idYes
limitNo

Implementation Reference

  • 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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ChrisChoTW/databricks-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server