Skip to main content
Glama

run_cancel

DestructiveIdempotent

Cancels an active run to stop ongoing execution; check run_status afterward to confirm the final state.

Instructions

Cancel a run. May answer cancelling; poll run_status for the end 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": "run_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
run_idYes

Output Schema

NameRequiredDescriptionDefault
stateYes
reasonNo
run_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is covered. The description adds genuinely non-redundant context: the call may return a non-terminal 'cancelling' state rather than a final outcome. It does not say whether in-flight work is discarded, whether permissions are required, or how long cancelling typically persists.

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 short sentences, front-loaded with the action and followed by the post-call behavior; nothing is padding. 'May answer cancelling' is slightly cryptic phrasing that costs a point.

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-value detail is not required, and annotations carry the destructive/idempotent profile. Still, for a destructive async operation the definition leaves out preconditions and the implications of an idempotent cancel (e.g., repeated calls on an already-cancelled run), which is a meaningful gap.

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% for the single run_id parameter, so the description would need to compensate and it does not — no format, source, or constraints for run_id. The field name is largely self-explanatory, keeping this at a minimum-viable 3 rather than lower.

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?

States a specific verb and resource ('Cancel a run'), which cleanly separates it from run_status, run_result, and run_start. It stops short of explicitly contrasting with the closest alternative (e.g., run_send for signalling), so a 4 rather than a 5.

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?

Gives useful follow-up routing ('poll run_status for the end state'), which tells the agent what to do after invoking. It never states when to prefer this over other run-mutating siblings or what precondition (e.g., run must be active) must hold, so usage is only implied.

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