Skip to main content
Glama

cancel_run

Terminates an active run and marks its tasks as cancelled, halting background subagent work when it is no longer needed.

Instructions

Cancel an active run and mark its tasks cancelled.

Input Schema

NameRequiredDescriptionDefault
reasonNo
run_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.3

TDQS

B3.2/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 discloses a mutation with a side effect (tasks marked cancelled) and an active-run precondition, but it does not mention permissions, irreversibility, terminal status effects, or whether cancellation can be undone.

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 front-loaded sentence with zero waste. It states the action and the key side effect efficiently.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive mutation tool with no annotations, no output schema, and undocumented parameters, the description is too thin. It should explain the 'reason' parameter, expected return/status, and what happens to in-flight tasks beyond the simple note.

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%. The description mentions no parameters; 'run_id' is inferable from the name, but 'reason' is completely undocumented in both schema and description. It does not compensate for the coverage gap.

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 an active run') and adds the effect of marking tasks cancelled, which distinguishes it from generic run operations. It does not explicitly differentiate from siblings like kill_agent or reject_action, but the purpose is clear.

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 phrase 'active run' implies a precondition (only active runs can be cancelled), which is useful. However, there is no guidance on when to use this versus alternatives such as kill_agent or reject_action, nor what to do for completed runs.

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