Skip to main content
Glama

job_cancel

Cancels a queued or running job and records the provided reason as a timeline event, so you can stop work and keep an audit trail.

Instructions

queued/running -> cancelled; the reason is recorded as a timeline event.

Input Schema

NameRequiredDescriptionDefault
job_idYesJob id from job_enqueue/job_list, e.g. 'j-1a2b3c4d'
reasonNoWhy it was cancelled (recorded on the timeline)

Output Schema

NameRequiredDescriptionDefault
idYes
kindYes
linksNo
phaseNo
titleYes
eventsNo
originNoWho asked for this run (human | agent | driver | eval | probe | warmup) — scopes the learning loopagent
paramsNoIntake: purpose, expected, caps, flags, pending_shot, ...
statusYes
targetYes
workerNo
host_idNoNULL = not yet assigned (host_choice='ask')
summaryNoPresent once the job is closed out
web_urlNoAbsolute URL of this job's page in the web UI
positionNo
artifactsNo
created_atYes
project_idNo
started_atNo
updated_atYes
crash_countNocrash-level events (the queue board flags these)
error_countNoerror-level events (the queue board flags these)
finished_atNo
current_stepNoThe step awaiting a verdict (newest prompt event + whether it is answered)
requested_byNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare a non-read-only, non-destructive, non-idempotent mutation, and the description adds real information beyond them: the allowed source states and the side effect that the reason lands on the job timeline. It does not say whether an already-running job is interrupted gracefully or what state the job ends in on rejection, so it is not 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One compact clause with the state transition front-loaded and the side effect second; nothing is wasted. It is arguably compressed to the point of omitting a needed precondition-failure clause, but every word present earns its place.

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?

With an output schema, full parameter coverage, and safety annotations present, the definition is close to self-sufficient. The remaining gap is behavioral on the failure path: what happens when the job is not queued/running, and whether cancellation is immediate for a running job, is left unstated.

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%, so both job_id ('from job_enqueue/job_list') and reason are already documented; baseline 3 applies. The description only echoes the schema's note that the reason is recorded on the timeline rather than adding format, length, or default behavior.

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 encodes a precise state transition ('queued/running -> cancelled'), which tells an agent the operation and its precondition far better than the tool name alone, and the 'job' framing distances it from build_cancel. It stops short of any explicit sibling differentiation (job_finish, job_restatus), which keeps it from 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 precondition 'queued/running' implicitly defines when the tool applies, so usage is inferable rather than stated. There is no explicit statement of when-not-to-use it, no guidance on a job already finished or failed, and no named alternative for stopping work in other states.

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