Skip to main content
Glama

cancel_job

Cancel a queued or running image-generation job by job ID without starting the sd-server. Use it to stop unwanted jobs and free resources.

Instructions

Cancel a job (queued or running). Does NOT start the server.

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral load, and it does disclose which job states can be cancelled plus a surprising non-side-effect ('Does NOT start the server'). However, it says nothing about whether cancellation is immediate, whether partial work is discarded, or what happens for an unknown or already-finished job_id.

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, front-loaded with the action and scope; the unusual caveat is placed second where it clarifies rather than distracts. No wasted words.

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

Completeness3/5

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

For a single-parameter mutation with no annotations and no output schema, the definition covers the action and scope but leaves out permission requirements, post-cancel state, and return/error behavior. Adequate to attempt a call, incomplete for predicting its consequences.

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

Parameters2/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 compensate and it does not: job_id is never described as to format, source (presumably from list_jobs/get_job), or behavior on invalid values. The only hint is the implicit notion of a job from the parenthetical.

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+resource ('Cancel a job') and narrows scope with '(queued or running)', which tells an agent which job states are eligible. It partly differentiates from siblings via 'Does NOT start the server', though it never distinguishes itself from stop_server or get_job.

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?

The parenthetical '(queued or running)' implies when the tool applies, and the negative clause hints at a boundary, but there is no explicit 'use X instead when Y' routing to stop_server or list_jobs. Usage is inferable rather than stated.

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