Skip to main content
Glama

cancel_queued_job

Destructive

Cancel a waiting print job in the queue by marking it cancelled without contacting a printer; use only for jobs still queued, not those already printing.

Instructions

Remove one job from the print queue while it is still WAITING.

Queue bookkeeping only: this marks the row cancelled and never sends
anything to a printer.  To STOP a job the machine has already
started, use ``cancel_print`` — that is the tool that talks to the
hardware.

Args:
    job_id: The job ID to cancel.

Only a job still in the QUEUED state can be cancelled here.  A job
that has reached the machine (starting, printing, or paused) is
refused with ``code="PRINT_IN_PROGRESS"`` rather than cancelled,
because marking the row cancelled would leave the queue claiming a
print had stopped while the printer carried on running it.

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_queued_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idYesThe job ID to cancel.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.5.1
    • addedInput schema / properties / job_id / description
      Added value: +"The job ID to cancel."
  2. Addedv1.3.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations mark it destructive/non-readonly, and the description adds the crucial behavioral fact that despite being destructive it is pure bookkeeping and never touches the printer. It also discloses the exact refusal behavior and error code (PRINT_IN_PROGRESS) and explains why the refusal exists, which no structured field conveys.

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?

Front-loaded with the core action and the sibling disambiguation, and the rationale paragraph is genuinely informative rather than filler. It is slightly padded: the Args section duplicates the schema entry verbatim, and the closing explanation restates the refusal rule already implied by the earlier sentences.

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

Completeness5/5

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

For a single-parameter mutation tool, the definition covers the precondition, the failure mode and its error code, the side-effect boundary, and the correct alternative tool. With no output schema present, it still tells the agent enough to know what success and refusal look like.

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 and the schema already documents it at 100% coverage, so baseline is 3. The description's Args block merely restates "The job ID to cancel" without adding format, source, or lookup guidance; the useful constraint it adds (must be QUEUED) belongs to usage, not to the parameter itself.

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+resource+state constraint ("Remove one job from the print queue while it is still WAITING") and immediately contrasts itself with cancel_print, the hardware-facing tool. An agent can distinguish this from the print-stopping 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 Guidelines4/5

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

Explicit when-to-use (job still QUEUED) and when-not (already at the machine: starting, printing, paused), and it names the correct alternative, cancel_print. The one gap is the very similarly named sibling cancel_queued_jobs (plural), which is never mentioned, so an agent choosing between single and bulk queue cancellation gets no guidance.

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

Deploy Server

Other Tools