Skip to main content
Glama

jobd_cancel

DestructiveIdempotent

Cancel a queued job or stop a running job via SIGTERM, optionally recording a reason on the broker's cancellation event.

Instructions

Cancel a job (queued → cancelled; running → SIGTERM via worker signal poll, ~2s).

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

Input Schema

NameRequiredDescriptionDefault
job_idYes
reasonNoWhy — recorded on the broker's job_cancelled event (see jobd_events).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.5.47
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / reason / description
      Added value: +"Why — recorded on the broker's job_cancelled event (see jobd_events)."
  2. First observedv0.5.5

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already disclose destructive=true, idempotent=true, and readOnly=false, so the safety profile is covered structurally. The description earns credit beyond that by revealing the mechanism (SIGTERM delivered via the worker's signal poll) and the latency (~2s), plus the two distinct state transitions. It omits what happens if the process ignores SIGTERM, i.e. whether there is escalation to SIGKILL, which keeps it from 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?

One sentence plus a parenthetical that carries the two state transitions, the signal mechanism, and the expected timing. Front-loaded with the verb, no filler, nothing to trim.

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 destructive two-parameter mutation with annotations covering safety and no output schema, the description supplies the operationally important facts: what states are affected, how the stop is delivered, and how long it takes. What remains missing is narrow — post-SIGTERM escalation behavior and error handling for an invalid or already-finished job_id.

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?

Schema description coverage is only 50%: the reason parameter is documented in-schema (recorded on the job_cancelled event), but job_id, the required key, is a bare integer with no meaning in either the schema or the description. The description adds nothing about either parameter, so it fails to compensate for the uncovered half.

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 and resource (cancel a job) and goes further by spelling out the two outcomes: queued jobs move to cancelled, running jobs get SIGTERM. An agent knows exactly what the call does. It stops short of 5 because it never distinguishes itself from the sibling jobd_preempt, which an agent might reasonably consider for the same goal.

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 rather than stated: the queued-vs-running breakdown tells the agent this works on jobs in either state, but there is no explicit 'use this when…' clause and no mention of jobd_preempt as the alternative for taking a job away from a worker.

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