Skip to main content
Glama
JustTryAI

Databricks MCP Server

run_job

Execute Databricks jobs by specifying job parameters, enabling automated workflow runs with configurable notebook inputs.

Instructions

Run a Databricks job with parameters: job_id (required), notebook_params (optional)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • MCP tool handler for 'run_job', registered via @self.tool decorator. Parses input parameters and delegates to the core jobs.run_job function, returning JSON-formatted results or errors.
    @self.tool(
        name="run_job",
        description="Run a Databricks job with parameters: job_id (required), notebook_params (optional)",
    )
    async def run_job(params: Dict[str, Any]) -> List[TextContent]:
        logger.info(f"Running job with params: {params}")
        try:
            notebook_params = params.get("notebook_params", {})
            result = await jobs.run_job(params.get("job_id"), notebook_params)
            return [{"text": json.dumps(result)}]
        except Exception as e:
            logger.error(f"Error running job: {str(e)}")
            return [{"text": json.dumps({"error": str(e)})}]
  • Core helper function implementing the Databricks job execution via API call to /api/2.0/jobs/run-now with job_id and optional notebook_params.
    async def run_job(job_id: int, notebook_params: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
        """
        Run a job now.
        
        Args:
            job_id: ID of the job to run
            notebook_params: Optional parameters for the notebook
            
        Returns:
            Response containing the run ID
            
        Raises:
            DatabricksAPIError: If the API request fails
        """
        logger.info(f"Running job: {job_id}")
        
        run_params = {"job_id": job_id}
        if notebook_params:
            run_params["notebook_params"] = notebook_params
            
        return make_api_request("POST", "/api/2.0/jobs/run-now", data=run_params)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden but only mentions parameters without behavioral traits. It doesn't disclose if this is a read/write operation, requires permissions, has side effects (e.g., resource consumption), rate limits, or what happens during execution (e.g., async/sync). This is inadequate for a tool that likely triggers job runs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief and front-loaded with the main action, using only one sentence. However, it could be more structured by separating purpose from parameter details, but it avoids unnecessary verbosity, earning a high score for efficiency.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (likely a job execution tool with no annotations, 0% schema coverage, and no output schema), the description is incomplete. It lacks details on behavior, return values, error handling, and integration with siblings, making it insufficient for effective agent use in this context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description adds minimal value beyond the schema. It mentions 'job_id (required), notebook_params (optional)', but the schema has a single nested 'params' object without details. The description doesn't explain parameter formats, constraints, or how they map to the schema, failing to compensate for the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the action ('Run a Databricks job') and mentions parameters, which gives a vague purpose. However, it doesn't specify what 'run' entails (e.g., execution, triggering, monitoring) or differentiate from siblings like 'execute_sql' or 'list_jobs', leaving room for ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., job must exist), exclusions (e.g., not for ad-hoc queries), or compare to siblings like 'execute_sql' for different execution contexts, leaving the agent without usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/JustTryAI/databricks-mcp-server'

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