Skip to main content
Glama

hf_job_cancel

Cancel a Hugging Face job by ID to stop its billing. Use the job ID from hf_job_list to terminate unwanted training runs and prevent further charges.

Instructions

Cancel any Hugging Face job by id (from hf_job_list), stopping its billing.

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

Input Schema

NameRequiredDescriptionDefault
job_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4/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. It does disclose one genuinely useful behavioral fact beyond the name — cancellation stops billing — which is the main side effect an agent needs to weigh. It omits irreversibility, whether running jobs are killed mid-step, and any ownership/auth requirement for a destructive operation.

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 resource, with the id provenance and the billing consequence packed into a short parenthetical and clause. No filler or redundant restatement of the title.

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?

An output schema exists, so return values need not be explained, and the description covers purpose, argument source, and the primary consequence of calling it. For a destructive one-parameter tool with no annotations, it could still say whether the cancel is idempotent or fails on already-terminal jobs.

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?

The single parameter has 0% schema description coverage, so the description is the only source of meaning for job_id; it usefully states the id comes from hf_job_list. It adds nothing about id format or validity, leaving the agent to infer what a well-formed job id looks like.

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

Purpose5/5

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

Specific verb ('Cancel') plus specific resource ('Hugging Face job') plus the keying parameter ('by id'). It also parenthetically names hf_job_list as the id source, which separates it from the launch/list siblings at a glance.

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

Usage Guidelines4/5

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

The parenthetical '(from hf_job_list)' tells the agent where to obtain the argument, which is real usage context, not just a restatement. It stops short of any exclusion guidance, e.g. what happens if the job already finished or was already cancelled.

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