Skip to main content
Glama

Cancel a group of jobs

cancel_job_group
DestructiveIdempotent

Cancel every job of a group that has not ended: their machines and billing stop, and waiting jobs never start. Jobs that already ended are left as they are. Returns the group, with cost_usd for all of its jobs (each job's machine time, every attempt, in USD to six decimal places).

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": {
      "id": "<id>"
    },
    "name": "cancel_job_group"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesGroup ID
workspaceNoWorkspace ID (optional: defaults to the authenticated workspace)
environmentNoEnvironment name (optional: defaults to the environment this session acts in)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / properties / env
      Removed value: -{
      -  "description": "Environment name (optional — defaults to main)",
      -  "type": "string"
      -}
    • addedInput schema / properties / environment
      Added value: +{
      +  "description": "Environment name (optional: defaults to the environment this session acts in)",
      +  "type": "string"
      +}
    • changedInput schema / properties / workspace / description
      Previous value: -"Workspace ID (optional — defaults to authenticated workspace)"New value: +"Workspace ID (optional: defaults to the authenticated workspace)"
  2. Added

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the destructive and idempotent annotations, the description explains the concrete effects: machines and billing stop, waiting jobs never start, and already-ended jobs are left alone. It also discloses the return shape and the cost_usd precision, which is useful behavioral context not covered by annotations.

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?

The description is three tight sentences with no filler. The cancellation scope is front-loaded, followed by exclusion behavior and return details in a logical order.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description fully explains the return value, including cost_usd coverage and precision. Combined with the cancellation semantics and annotation-backed safety profile, an agent has everything needed to call it correctly.

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 the input schema already documents id, workspace, and environment with their defaults. The description adds no parameter-level detail beyond referring to the group and its return fields, so the baseline of 3 is appropriate.

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 states a specific verb and resource: cancel every non-ended job in a job group. It also clearly scopes the operation by explaining that ended jobs are untouched, which distinguishes it from the single-job sibling cancel_job.

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 group-level scope is clear from 'every job of a group,' making it inferable that this is the batch alternative to cancel_job. However, it never explicitly names cancel_job or states when to prefer one over the other, so the guidance is clear but not fully explicit.

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.