Skip to main content
Glama

Cancel a job

cancel_job
Destructive

Cancel a queued or running document job to return reserved credits; cancelled jobs are never charged and can be retried later.

Instructions

Cancel a document job that is still queued or running. Its reserved credits are returned - a cancelled job is never charged - and retry_job can run it again later. Free.

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_idYesThe job to cancel

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.7.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, so the big warning is structured; the description still adds non-obvious consequences: reserved credits are returned, a cancelled job is never charged, and it is reversible via retry_job, plus a cost note ('Free'). It does not say what happens to partial output or whether cancellation is immediate, so it falls short of 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the action and its precondition, then the side effects, then the cost. The one-word 'Free.' earns its place by answering a likely cost concern up front.

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 mutation with no output schema and annotations covering the destructive profile, the description supplies the key missing context: state prerequisite, credit refund behavior, reversibility, and cost. Only the shape of the success response is left unspecified, 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?

Schema coverage is 100% ('The job to cancel'), so the parameter is already documented. The description adds only an implicit validity constraint on job_id (the job must be queued or running), which is useful but marginal, matching the baseline 3 for high-coverage schemas.

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 document job) plus a scope constraint ('still queued or running'), which lets an agent distinguish it from retry_job, check_job, or list_jobs without opening a 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?

Gives a clear precondition for use (job must be queued or running) and points to the relevant alternative path ('retry_job can run it again later'). It stops short of explicitly stating when NOT to cancel (e.g. completed jobs) or naming a sibling to use for checking state first.

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