Skip to main content
Glama

cancel

Stops a running job and terminates its entire process tree. Use it to halt long-running or stuck worker tasks by passing the job ID.

Instructions

Cancel a running job and kill its process tree

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

Input Schema

NameRequiredDescriptionDefault
job_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.5.0

TDQS

B3/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does disclose the critical trait that the process tree is killed, but says nothing about whether cancellation is idempotent, what happens to partial results or exit status, whether permissions are required, or what the underlying operation returns.

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?

One short sentence, front-loaded with the verb and resource, with the destructive effect stated immediately after. There is no filler or hedging to trim.

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

Completeness2/5

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

For a destructive lifecycle operation with no annotations, no output schema, and zero parameter documentation, the definition is too thin. It omits the identifier's origin, the post-cancel state of the job, and any indication of what is returned or whether the kill can affect unrelated processes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is a single required parameter, job_id, with 0% schema description coverage, so the description must compensate and does not. It never indicates where a job_id comes from (presumably start or get) or what format it takes, leaving the agent to infer the identifier source from sibling names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description pairs a specific verb ("Cancel") with a specific resource ("a running job") and adds the concrete effect "kill its process tree", which is enough to distinguish it from lifecycle siblings such as start, wait, and tail. It stops short of explicitly naming an alternative, so a 4 rather than a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The qualifier "running job" implies the applicable state, which is useful selection context. However, there is no explicit statement of when not to use it, what to do if the job already finished, or which sibling to reach for when the intent is merely to inspect a job.

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