Skip to main content
Glama

cancel_run

Requests cancellation of a running task; only a cancelled status confirms shutdown. Poll get_run to verify the run has stopped.

Instructions

Request cancellation; only cancelled confirms shutdown. Poll get_run.

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/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 and does disclose the critical async trait: this only requests cancellation, so calls are non-final and the agent must verify via get_run. It omits other important behavior such as idempotency, behavior on already-completed runs, error cases, and whether in-flight work is discarded.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

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

Two terse clauses with zero waste, and the most consequential fact (cancellation is only a request) is front-loaded. The telegraphic phrasing borders on clipped, but nothing is redundant.

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?

For a one-parameter, no-annotation, no-output-schema mutation it covers the essential async semantics and the follow-up call. It still leaves gaps an agent would want: what a rejection looks like, whether repeated calls are safe, and how run_id is obtained.

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

Parameters2/5

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

Schema description coverage is 0% and the single run_id parameter gets no explanation in the description—no format, no source (e.g. from list_runs), no scope note. The agent must infer everything about the identifier from its name alone.

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?

"Request cancellation" names a specific action, and "only cancelled confirms shutdown" makes clear the resource is a run being halted. It is distinguishable from the get_run sibling it points to, though the object 'run' is only implied by the name and run_id parameter rather than stated in the description itself.

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?

It explicitly routes the agent to get_run for polling, which is the key alternative action after calling this tool. It does not state when cancellation is inappropriate (e.g. already-finished runs) or any preconditions, but the when-to-use path is clear.

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