Skip to main content
Glama

cancel_job

DestructiveIdempotent

Cancel queued ComfyUI jobs by prompt ID to clear pending work; only pending jobs are stopped, so use the interrupt tool to stop a running job.

Instructions

Cancel a queued job by prompt ID. NOTE: This only works for jobs that are queued (pending), NOT for jobs that are already running. To stop a running job, use the 'interrupt' tool instead.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cancel_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
promptIdNoSpecific prompt ID to cancel. If not provided, cancels all jobs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and openWorldHint=true, so the safety profile is covered. The description still adds genuinely new behavior context: the operation silently fails or is inapplicable for running jobs, which is exactly the kind of precondition an annotation cannot express. It stops short of saying what the caller receives on success or when the target is not queued.

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 sentences, zero filler. The primary action is front-loaded and the constraint plus fallback follow immediately, so the reader gets the routing decision in a single pass.

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 tool with full schema coverage, full annotations, and no output schema, the description covers the essential decision points. The minor gap is what the caller observes on success or when the job is not in a queued state.

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 100% and the schema already explains that omitting promptId cancels all jobs. The description adds only that cancellation is keyed on prompt ID, which is a restatement rather than new meaning; per the coverage rule this sits at the baseline.

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 (cancel) and resource (a queued job, identified by prompt ID) and immediately bounds the scope to pending jobs only. An agent can distinguish it from 'interrupt' without consulting 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?

Explicitly names the when-to-use condition (job is queued/pending), the when-not condition (job already running), and the alternative tool to use in that case ('interrupt'). This is the textbook shape for routing between sibling tools.

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