Skip to main content
Glama

Cancel job

cancel_job
Destructive

Stop a queued or running job; its sandbox is removed, the log and usage so far are kept. Returns the job's state. To stop every job of a batch at once, cancel the batch instead.

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_idYesJob ID (job_…) returned by run_job.

Output Schema

NameRequiredDescriptionDefault
job_idYesJob ID.
statusYesJob state after the call.
cancel_requestedYesCancellation is in progress (the sandbox is being stopped).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, so the danger is known; the description earns credit by specifying the blast radius — the sandbox is removed but the log and usage so far are kept. That is genuine side-effect detail not present in the annotations. The one gap is what happens when the job has already finished or when cancel is repeated.

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?

Two sentences, front-loaded with the action and its effect, followed by the sibling routing note. No filler and nothing buried.

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 the brief 'Returns the job's state' is sufficient and the description correctly spends its words on effects and alternatives. Completeness would be higher if it covered the already-finished or repeated-cancel cases for a destructive operation.

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 and the schema documents it at 100% coverage ('Job ID (job_…) returned by run_job'). The description adds no further meaning about the identifier, so it sits at the baseline for a fully-documented schema.

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?

The description gives a specific verb plus resource ('Stop a queued or running job') and immediately scopes which job states qualify. It is clearly distinguishable from the sibling cancel_batch, which it names.

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

Usage Guidelines5/5

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

It states the condition that selects an alternative tool explicitly: 'To stop every job of a batch at once, cancel the batch instead.' This is exactly the routing guidance an agent needs between cancel_job and cancel_batch.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources