Skip to main content
Glama

Cancel run

run_cancel
DestructiveIdempotent

Cancel a run (idempotent — answers with the resulting status, so an already-terminal run reads as what it already was).

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": "run_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idYesRun id (job_id from run_start or run_list).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / job_id / description
      Added value: +"Run id (job_id from run_start or run_list)."
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true, destructiveHint=true, and readOnlyHint=false, so the safety profile is covered. The description adds real value beyond that by explaining the return semantics — the call answers with the resulting status, and an already-terminal run echoes its prior state — which the annotations do not convey. It stops short of describing what happens to in-flight work or whether cancellation is reversible for a running job.

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?

One sentence, front-loaded with the action, and the parenthetical is the only elaboration — and it earns its place by explaining idempotent return behavior. Nothing here is padding.

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?

For a one-parameter mutation with no output schema, the definition covers purpose, idempotency outcome, and the identifier source. Missing only failure semantics — what happens if the id is unknown — which is a modest gap for a simple tool.

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 with 100% schema description coverage, and that description already tells the agent the value is a run id from run_start or run_list. The prose adds nothing about the identifier format or validation, so the schema carries the full burden and the baseline of 3 applies.

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?

Specific verb plus resource: 'Cancel a run' leaves no ambiguity about the operation. It does not, however, mention how it differs from the sibling group_run_cancel, so an agent must infer that one targets a single run and the other a group.

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 parenthetical implies it is safe to call even when the run may already be finished, which is useful decision context. There is no explicit statement of when to prefer this over group_run_cancel, run_get, or other lifecycle tools, so guidance remains implied rather than stated.

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.