Skip to main content
Glama

cancel_run

Cancel an owned queued or running job by run_id. Completed records stay immutable, so agents can stop work without altering stored evidence.

Instructions

Cancel an owned queued/running job; completed records remain immutable.

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": {
      "run_id": "<run_id>"
    },
    "name": "cancel_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
run_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/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 usefully discloses two behavioral facts: ownership is required, and completed records are immutable so cancellation does not erase history. It does not say whether cancellation is reversible, what status the run transitions to, or whether in-flight work is terminated, which are significant gaps for a mutation 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?

A single dense sentence with the eligibility constraint front-loaded and the immutability guarantee appended. Nothing is wasted and nothing important is buried.

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

Completeness3/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 no explanation. However, for an unannotated mutation with an undocumented parameter, the definition should say more about post-cancellation state and irreversibility; the ownership and immutability clauses are a good start but leave the agent guessing about effects.

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 description coverage is 0% and there is one required parameter, so the description must supply meaning. It implies run_id identifies an owned run in a cancellable state, which is genuinely useful constraint information, but it adds no format, source, or lookup guidance for obtaining a valid ID.

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?

The description gives a specific verb ('Cancel') and a scoped resource ('owned queued/running job'), and the state restriction ('queued/running') distinguishes it from read tools like get_run. Minor terminology drift between 'job' and the tool name's 'run' keeps it from a 5, but an agent can still tell what it does 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 Guidelines3/5

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

The description states the precondition for use (the run must be owned and in queued/running state), which implicitly tells the agent when not to call it. It does not name an alternative for other cases, such as checking status with get_run before cancelling, nor does it explain what to do if the run is already completed.

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