Skip to main content
Glama

Cancel job

cancel_job
DestructiveIdempotent

Cancel a job that has not finished. A model call already running is not interrupted, but its result is discarded. Returns the job's status afterwards. job_id is the request_id returned by generate.

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

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is covered. The description adds genuinely non-obvious behavior: an in-flight model call is not interrupted but its result is discarded, and the tool returns the job's status afterwards. It does not discuss permissions or what happens to already-completed work, keeping it below 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.

Conciseness5/5

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

Three short sentences, front-loaded with the action and its precondition, then the caveat, then the parameter origin. No filler or repetition.

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?

With an output schema present, return values need not be detailed, and the single parameter is explained. The only remaining gap is the absence of guidance on choosing this over cancel_run, which is minor for a one-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the schema only labels the field "Job Id", so the description must compensate. It does so by identifying job_id as the request_id returned by generate, which is the key detail an agent needs to supply a valid value.

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 job") plus a precondition ("that has not finished"), which lets an agent tell it apart from get_job or wait_for_job. It does not explicitly differentiate itself from the sibling cancel_run, so it stops short of 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 phrase "a job that has not finished" implies the applicable condition, and the note that a running model call is not interrupted hints at when cancellation is only partially effective. However, there is no explicit when-not guidance or named alternative (e.g., cancel_run) for the agent to choose between.

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