Skip to main content
Glama

run_job

Destructive

Run slow commands like renders or Whisper as a tracked job that outlives the chat, returning a job id at once instead of a background Bash job.

Instructions

Run slow work (a render, Demucs, Whisper, matting, any command over about 30 s) in Takes, never as a background Bash job or with sleep. Returns a job id at once. The job outlives the chat and Takes, and shows its progress in the session's Jobs row. cmd runs in zsh in the session folder. The result's note says how to wait.

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": {
      "session": "<session>",
      "cmd": "<cmd>",
      "outputs": "<outputs>",
      "label": "<label>"
    },
    "name": "run_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
cmdYesThe shell command. Print 'TAKES_PROGRESS 0.4' lines for a progress bar (ffmpeg and N% lines work too).
labelYesA few words the user sees, e.g. Render edit v3.
outputsYesNew files the job writes, relative to the session (paths from next_path). [] if none.
sessionYesSession: 'Project/folder', an absolute path or its id (from get_session). Old paths still work.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2026.11.11
    • changedInput schema / properties / session / description
      Previous value: -"Session as 'Project/folder', an absolute path, or its id (from get_session). An old path still works after a rename or move."New value: +"Session: 'Project/folder', an absolute path or its id (from get_session). Old paths still work."
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered; the description adds real context on top: fire-and-forget semantics, that the job outlives the chat and Takes, that progress surfaces in the session's Jobs row, and that cmd runs in zsh inside the session folder. It does not explain what makes the call destructive (arbitrary shell execution writing new files) or what happens on command failure, which keeps it below a 5.

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?

Five tight sentences with the core rule and exclusion front-loaded; no filler. The closing line 'The result's note says how to wait' is useful but tersely phrased enough to require interpretation.

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

Completeness4/5

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

For a fire-and-forget job launcher with four required params, no output schema, and full schema coverage, the description covers lifecycle, environment, and progress reporting well. The main omission is failure/timeout behavior and any note that the command can overwrite or clobber files in the session folder.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description still adds value by tying cmd to a zsh shell scoped to the session folder and by framing outputs implicitly as newly written files. That working-directory/shell context is genuinely beyond the schema text, though parameter-by-parameter meaning is largely already documented.

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?

States a specific verb and resource ('Run slow work ... in Takes') and enumerates concrete workloads (render, Demucs, Whisper, matting, commands over ~30 s). It also declares the async contract ('Returns a job id at once'), which cleanly separates it from synchronous siblings like check_edit or get_session.

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?

Gives an explicit trigger (slow work over ~30 s) plus negative guidance ('never as a background Bash job or with sleep'), which is exactly the failure mode an agent would otherwise pick. It stops short of naming sibling tools such as get_job or stop_job for follow-up, leaving the waiting/polling path to be inferred from 'The result's note says how to wait.'

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