Skip to main content
Glama

Cancel Job

cancel_job
Idempotent

Cancel a running async job (verify / preview / brand-kit-extract) returned by an enqueue call — abort a mis-priced job instead of waiting out its TTL. For box-backed jobs the warm box is reaped best-effort; cancel never meters. No-op-reject (422) if already terminal.

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

Input Schema

NameRequiredDescriptionDefault
jobIdYesjobId (path).
commandIdNoRetry identity. A call repeated with the same commandId returns the first result instead of acting twice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / $defs
      Added value: +{
      +  "__schema0": {
      +    "maxLength": 128,
      +    "minLength": 1,
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / commandId / $ref
      Added value: +"#/$defs/__schema0"
    • removedInput schema / properties / commandId / maxLength
      Removed value: -128
    • removedInput schema / properties / commandId / minLength
      Removed value: -1
    • removedInput schema / properties / commandId / type
      Removed value: -"string"
  2. Changed1 schema field changed
    • addedInput schema / properties / commandId
      Added value: +{
      +  "description": "Retry identity. A call repeated with the same commandId returns the first result instead of acting twice.",
      +  "maxLength": 128,
      +  "minLength": 1,
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses billing behavior ('cancel never meters'), side effects on infrastructure ('warm box is reaped best-effort'), and the exact failure mode with status code ('422 if already terminal'). This is exactly the context the idempotentHint/destructiveHint flags cannot convey.

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, with the core action and job types front-loaded before the billing and error semantics. Every clause contributes new information.

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?

Covers the mutation's side effects, billing and error behavior, which is more than enough for a two-parameter tool with full schema coverage. The only gap is that no output schema exists and the description does not say what a successful cancel returns.

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% and commandId already carries a clear retry-identity explanation, so the structured data does the heavy lifting. The description adds no argument-level detail such as where to obtain jobId or how commandId interacts with cancellation, so baseline 3 applies.

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 ('Cancel a running async job') and enumerates exactly which job kinds qualify (verify / preview / brand-kit-extract) while anchoring the resource to 'returned by an enqueue call'. An agent can distinguish this from wait_job purely from the description.

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 concrete when-to-use motive ('abort a mis-priced job instead of waiting out its TTL') and a when-not condition ('No-op-reject (422) if already terminal'). It implies the alternative (wait_job) through 'instead of waiting out its TTL' but never names it, so routing is slightly inferential.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.