Skip to main content
Glama

Cancel job

job_cancel
DestructiveIdempotent

Request cooperative cancellation when an open job should stop. Work stops at a checkpoint and may still complete; cancellation is rejected for terminal jobs or once result publication starts. Compute already used is still accounted for. Returns current status and cancelRequested/cancelAccepted, not proof of cancellation; poll job_get or job_wait for the terminal state. Use jobs_list to locate a job or job_report for detailed results.

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": "job_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
jobIdYesDurable job ID returned when an asynchronous operation is queued.
reasonNoOptional reason recorded when cancelling the job.

Output Schema

NameRequiredDescriptionDefault
jobIdYesDurable job ID returned when an asynchronous operation is queued.
statusYes
cancelAcceptedYes
cancelRequestedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the destructiveHint/idempotentHint annotations, the description discloses that cancellation is cooperative, may still allow completion, can be rejected, still bills compute already consumed, and that success is not proof of cancellation. These are exactly the non-obvious behaviors an agent needs before calling a destructive tool.

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?

Front-loaded with the action and its cooperative nature, then constraints, then return-value caveat, then sibling routing. Every sentence carries distinct information; nothing is redundant with the title or annotations.

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?

Even though an output schema exists, the description adds the crucial semantic caveat that the response is a status snapshot rather than proof of termination, and explains the polling path. For a destructive, async, idempotent operation this is complete guidance.

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 both jobId and reason are documented in the schema, so the baseline is 3. The description adds nothing about the parameters themselves—it never mentions the reason field or the durable job ID format—so it does not exceed 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 and resource ('Request cooperative cancellation') and immediately qualifies the kind of cancellation, which separates it from job_get, job_wait, job_report, and jobs_list. An agent knows exactly what this call does to a job without opening the 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 states when cancellation applies and when it is rejected (terminal jobs, once result publication starts), then routes elsewhere: jobs_list to locate a job, job_report for results, job_get/job_wait to observe the terminal state. Both the when-to-use and the alternatives are named.

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.

Resources