Skip to main content
Glama

Cancel job

cancel_job
DestructiveIdempotent

Request cancellation of a pending, running or paused LLM job. In-flight model calls may finish and persist records; remaining work is skipped. Cancellation does not roll back records or database writes. Read get_job_status and list_records(job_id=...) afterward to inspect the outcome. No new LLM call is started by this tool.

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 to cancel.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already mark this as destructive and idempotent, but the description adds critical nuance: in-flight calls may finish and persist records, remaining work is skipped, records/database writes are not rolled back, and no new LLM call is started. These are exactly the side-effect details an agent needs before invoking a destructive tool.

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?

Four short sentences, front-loaded with the core action and state scope, followed by side effects and follow-up guidance. Every sentence carries distinct, useful information with no 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?

Given an output schema and rich annotations, the description covers behavior, side effects, and post-cancellation inspection well. It does not explicitly state what happens when the job is already in a terminal state, though idempotentHint implies safety, leaving a small gap for an agent checking edge cases.

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% and the single job_id parameter is already documented in the schema. The description correctly refers to job_id in the follow-up example but adds no new semantic detail about the parameter itself, so baseline 3 applies.

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?

States a specific verb (request cancellation), resource (an LLM job), and the exact states it applies to (pending, running, paused). Sibling tools are named for follow-up, so the agent can place it precisely.

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?

Clear about the circumstances covered (pending/running/paused jobs) and explicitly routes the agent to get_job_status and list_records(job_id=...) to inspect results. There is no explicit when-not guidance, but the follow-up routing effectively covers the main alternative.

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.