Skip to main content
Glama

cancel_run

Request cancellation of a run by ID and poll its status until terminal to confirm the final state.

Instructions

Request cancellation, then poll get_run until terminal to learn the last confirmed state.

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

A4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden. It discloses the key non-obvious behavior: cancellation is asynchronous ('request' cancellation), and the tool itself does not return the confirmed terminal state — that requires polling get_run. Missing are error/idempotency semantics (e.g., cancelling an already-finished run) and permission requirements.

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 front-loaded sentence with zero filler; the essential behavior and follow-up action are stated in the fewest words possible.

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 annotations and no output schema, the description covers the two things an agent most needs: that the call is a request, and how to learn the final state. Only failure/edge-case behavior is left to inference.

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?

Only one parameter (run_id) with 0% schema description coverage. The description never explains run_id's format or source, but referencing get_run implicitly signals the same run identifier is used there. Minimum viable, with a real gap in identifier semantics.

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+resource: it requests cancellation of a run and names the sibling (get_run) used to confirm the outcome. An agent can distinguish it from other run-related siblings at a glance, though it never explicitly says the run is identified by run_id.

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?

Gives explicit post-invocation procedure: poll get_run until terminal to obtain the last confirmed state. It does not cover edge cases (run already terminal, permission failures) or state when not to call it, but for a single-purpose cancellation tool the procedural guidance is clear.

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