Skip to main content
Glama

cancel_job

Cancel a running or pending SLURM job by job ID, optionally specifying the cluster, to stop unwanted or queued workloads.

Instructions

Cancel a running or pending SLURM job.

Args:
    job_id: SLURM job ID to cancel
    cluster: Cluster name (required; see ``list_clusters``).

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

Input Schema

NameRequiredDescriptionDefault
job_idYes
clusterNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv6.0.0
    • addedInput schema / properties / cluster
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Cluster"
      +}
    • removedInput schema / properties / transport
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Transport"
      -}
  2. Addedv3.0.3
  3. Removedv3.0.2
  4. Changed2 schema fields changedv0.1.1
    • addedInput schema / properties / transport
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Transport"
      +}
    • removedInput schema / properties / use_ssh
      Removed value: -{
      -  "default": false,
      -  "title": "Use Ssh",
      -  "type": "boolean"
      -}
  5. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. "Cancel" signals a mutation and the running/pending qualifier hints that other job states may not be cancellable, but irreversibility, required permissions, side effects on job output, and error behavior are never disclosed.

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?

Front-loaded purpose sentence followed by a compact two-argument block; nothing is padded. The reStructuredText-style Args block is slightly verbose given only two short parameters but remains clear.

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 two-parameter mutation tool with no annotations, the definition covers purpose and both parameters, and an output schema exists to explain return values. It still omits anything about irreversible effects, permission requirements, or the required/optional conflict on ``cluster``.

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 0%, so the description must compensate, and it does document both arguments. However, it says the ``cluster`` argument is "required" while the schema marks only ``job_id`` as required and gives ``cluster`` a null default — this conflict is likely to mislead an agent.

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 running or pending SLURM job") plus the state scope. It is clearly distinct from submit_job/list_jobs/get_job_status by the verb alone, though it never names a sibling or an alternative action.

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 "running or pending" qualifier implies the situations it applies to and points to ``list_clusters`` for the cluster argument, but there is no explicit when-to-use/when-not guidance, no mention of what to do for jobs in other states, and no named alternative tool.

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