Skip to main content
Glama

worker_cancel

Terminate a running background worker process group by job ID and mark the job as cancelled to stop long-running CLI tasks.

Instructions

Terminate a running background worker process group and mark the job cancelled.

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

Input Schema

NameRequiredDescriptionDefault
job_idYesThe job_id to cancel.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose two concrete effects: the process group is terminated and the job is marked cancelled. It does not say whether termination is graceful or forceful, whether the operation is idempotent, whether it is irreversible, or what it returns on success or failure.

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 sentence, front-loaded with the action and its two effects, with no redundant or filler wording.

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

Completeness3/5

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

For a destructive, zero-annotation tool with no output schema, the definition covers what happens but not the failure modes, reversibility, or result shape an agent would need to call it safely. It is minimally adequate rather than complete.

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?

There is a single parameter with 100% schema description coverage ('The job_id to cancel.'), so the schema already documents it fully. The description adds no further meaning about job_id semantics such as accepted formats or whether completed-job ids are valid.

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?

States a specific verb (terminate) plus the resource (a running background worker process group) and the resulting state change (job marked cancelled). It is clearly distinguishable in function from siblings like worker_status or worker_wait, though it never names an alternative explicitly.

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?

Usage is implied: call this to stop a running job. There is no guidance on when not to use it, what happens if the job is already finished or already cancelled, or whether a different tool should be used for graceful shutdown versus termination.

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