Skip to main content
Glama

Cancel a job

job_cancel

Cancel a running demo-video job at the next safe checkpoint; partial timeline and footage are preserved, then poll job_status for the final state.

Instructions

Best-effort cancel (checked between actions/scenes/stages). A mid-record cancel salvages the partial timeline + footage. The job settles asynchronously — poll job_status for the final state.

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": {
      "jobId": "<jobId>"
    },
    "name": "job_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
jobIdYes

Output Schema

NameRequiredDescriptionDefault
kindYes
errorNo
jobIdYes
stageYes
resultNo
statusYes
demoDirYes
endedAtYes
logFileYes
logTailYes
startedAtYes
scenesDoneYes
scenesTotalYes
currentSceneYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.20.2
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / properties / result / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  2. First observedv0.9.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses that cancellation is best-effort and only checked at discrete boundaries, that partial work is salvaged rather than discarded, and that settlement is asynchronous. It omits permission/auth requirements and whether a cancel can fail outright, but the core behavioral profile an agent needs is present.

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

Conciseness5/5

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

Three short sentences, front-loaded with the most decision-relevant fact (best-effort, boundary-checked) before the consequences and the follow-up instruction. No filler, no restatement of the tool name.

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 one-parameter mutation with an output schema already present, the description covers the non-obvious risks: partial cancellation, salvaged output, and async settlement requiring a status poll. What remains unsaid — identifier format, failure modes — is minor given the tool's simplicity.

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

Parameters3/5

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

There is one parameter (jobId) with 0% schema description coverage, so the description must compensate and does not — it never says what identifier form jobId takes or where it comes from (presumably job_list/job_status). The single obvious parameter keeps this from being a serious gap, but the description adds no meaning beyond the schema.

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

Purpose4/5

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

"Best-effort cancel" gives a specific verb plus the tool's resource (a job), and the parenthetical clarifies the cancellation granularity (between actions/scenes/stages). This distinguishes it from siblings like job_status and job_list without ambiguity, though the description never restates that it takes a job ID, leaving that to the schema.

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?

It establishes the follow-up path clearly — cancel, then poll job_status for the final state — which tells an agent how this tool fits into a workflow. It stops short of explicit exclusionary guidance (e.g., what to do if the job already finished, or which sibling to prefer for inspecting a job before cancelling).

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