Skip to main content
Glama

cancel_job

Stop a queued or running image-generation job by job ID. Finished jobs remain unchanged, so you can halt only pending or active work.

Instructions

Cancel a queued or running job. A finished job does not change.

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": {
      "job_id": "<job_id>"
    },
    "name": "cancel_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idYes

Output Schema

NameRequiredDescriptionDefault
stepYes
errorNo
stageYes
stateYes
job_idYes
messageNo
percentYes
warningsYes
elapsed_sYes
next_stepNo
total_stepsYes
queue_positionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare destructiveHint=false and openWorldHint=false, lowering the burden. The description adds genuinely useful behavior: cancelling a completed job is a no-op. It does not say whether cancellation is reversible, what happens to a running job's partial output, or whether an error is raised for unknown job ids.

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?

Two short sentences with zero filler; the valid-target constraint is front-loaded and the no-op caveat follows immediately.

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?

A simple one-parameter mutation with an output schema and annotations present; almost everything an agent needs is covered. The remaining gap is the absence of any outcome/error semantics (unknown id, irreversible cancellation).

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?

Schema description coverage is 0% for the single parameter, so the description carries some burden. 'job_id' is self-descriptive and the description implies it identifies the target job, but no format, source, or lookup guidance is given.

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?

States a specific verb and resource ('Cancel ... job') plus the scope of valid targets ('queued or running'), so an agent can distinguish it from get_job_status or get_job_result. No sibling is named, but the action is unambiguous.

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

Usage Guidelines3/5

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

Implies when to use it by restricting targets to queued or running jobs, and 'A finished job does not change' signals the no-op case for finished jobs. It gives no explicit exclusions or alternative actions (e.g. when to poll status instead), leaving routing to inference from sibling names.

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