Skip to main content
Glama

Cancel a job

cancel_job
Idempotent

Cancels a queued or running image, video, or upscale job when settings are wrong or processing takes too long, leaving the item in the gallery marked cancelled.

Instructions

Cancels a queued or running job (image, video or upscale); the item stays in the gallery with status "cancelled". Use it when a job was started with wrong settings or takes too long. Finished items are not affected; to remove one use delete_item.

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

Input Schema

NameRequiredDescriptionDefault
idYesGallery id of the queued or running job

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.33.2

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare idempotentHint=true and destructiveHint=false; the description adds real outcome detail beyond them — the item is retained in the gallery with status 'cancelled' and finished items are untouched, which is consistent with the non-destructive annotation. It stops short of covering permissions or what the call returns, so a 4 rather than 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?

Two tight sentences: the effect and resulting state come first, then the usage condition and the sibling alternative. Every clause carries information, with only a minor punctuation awkwardness around the nested quotation of 'cancelled'.

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, non-destructive mutation with no output schema, the description covers effect, post-state, edge case (finished items) and the alternative tool. Only the return value/confirmation is unspecified, which is a minor gap.

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?

Only one parameter at 100% schema coverage, so the schema already carries the semantics ('Gallery id of the queued or running job'). The description reinforces the valid target state (queued or running) but adds no format or syntax detail beyond that, making baseline 3 appropriate.

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 (cancels) and scoped resource (queued or running job of type image, video or upscale), and explicitly contrasts with delete_item. An agent can distinguish it from delete_item and the other siblings without opening any schema.

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

Usage Guidelines5/5

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

Gives concrete when-to-use conditions (wrong settings, takes too long) and an explicit exclusion plus the alternative for that exclusion ('Finished items are not affected; to remove one use delete_item'). No inference required.

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