Skip to main content
Glama

submit_job

Run a local Python project as a private background job on Kaggle with code, datasets, and optional GPU, returning immediately so training or batch processing runs unattended.

Instructions

Run a Python project on Kaggle as a private background job; returns immediately.

The project's code (excluding .git, virtualenvs, caches and data_dir) is bundled; on Kaggle
`entry` runs as `__main__` with cwd=/kaggle/working. Files written there become the job's
output (limit ~20 GB). If the project has requirements.txt it is pip-installed first
(needs internet=True). Each run is limited to 12 hours.

Args:
    project_dir: Local project directory.
    entry: Script to run, relative to project_dir (e.g. "train.py").
    data_dir: Optional local directory uploaded as a private dataset for this job only.
        On Kaggle its path is in env var KJOB_DATA_DIR. Subdirectories are uploaded zipped.
    datasets: Existing Kaggle dataset refs ("owner/slug") to attach, mounted under
        /kaggle/input. Use upload_dataset for data shared by many jobs.
    gpu: Request a GPU (counts against the weekly GPU quota).
    internet: Allow network access (pip installs, downloads).
    ephemeral: Delete the job's kernel, outputs and per-job dataset from Kaggle after
        job_output downloads them, so Kaggle storage does not fill up.
    resume_from: job_id of a finished job whose output (e.g. checkpoints) this job continues
        from; on Kaggle its path is in env var KJOB_RESUME_DIR (read-only).
    time_limit_h: Stop the run after this many hours (max 12, Kaggle's cutoff) so its
        output is saved. Env var KJOB_DEADLINE holds the deadline as epoch seconds; the run
        is stopped there if the script has not exited, and job_output reports incomplete.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_dir": "<project_dir>",
      "entry": "<entry>"
    },
    "name": "submit_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
gpuNo
entryYes
data_dirNo
datasetsNo
internetNo
ephemeralNo
project_dirYes
resume_fromNo
time_limit_hNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so thoroughly. It discloses bundling exclusions, the Kaggle execution environment (cwd=/kaggle/working), output limits (~20 GB), pip-install behavior, the 12-hour run limit, ephemeral deletion semantics, and deadline environment variables.

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 front-loaded with the core purpose and then organized into a structured Args section. It is somewhat long, but the length is justified by the absence of schema descriptions and the complexity of the tool; there is little obvious filler.

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

Completeness5/5

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

The tool is complex with 9 parameters and no annotations, but the description covers execution environment, bundling, limits, environment variables, and cleanup behavior. Since an output schema exists, the description does not need to document return values, and it correctly focuses on submission behavior.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must fully document the 9 parameters. It does so with concrete semantics for each, including data_dir upload behavior and KJOB_DATA_DIR, dataset reference format, ephemeral cleanup effects, resume_from's KJOB_RESUME_DIR, and time_limit_h's max and interaction with KJOB_DEADLINE.

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

Purpose5/5

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

The first sentence states a specific verb and resource: 'Run a Python project on Kaggle as a private background job; returns immediately.' It distinguishes the tool from siblings by explaining that it returns immediately and naming upload_dataset as the alternative for shared data.

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

Usage Guidelines4/5

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

The description gives clear context for several parameters, such as using upload_dataset for data shared by many jobs and using resume_from to continue from a finished job. It does not explicitly state when to use submit_job versus job_status, job_logs, or list_jobs, but the primary operating context is clear.

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