Skip to main content
Glama

cancel_run

Stops an active run or sweep by ID, terminating session-started work with SIGTERM then SIGKILL after five seconds.

Instructions

Stop a run (SIGTERM, then SIGKILL after 5 s) or a whole sweep started from this session.

Input Schema

NameRequiredDescriptionDefault
run_idYesRun or sweep id started by run_step / run_sweep

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.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 behavioral burden, and it does add real value by disclosing the termination mechanism (SIGTERM, escalating to SIGKILL after 5 s), signalling a forced, likely non-graceful termination. It omits other important traits: whether cancellation is reversible, what happens to partial results or checkpoints, and whether cancelling a sweep cascades to its child runs.

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?

A single compact sentence with the core action and the key mechanic (SIGTERM/SIGKILL timing) front-loaded, and no filler. The parenthetical is dense but every clause earns its place.

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 values need not be explained, which lowers the bar. Still, for a destructive, annotation-free operation on runs and sweeps, the description should say what happens to in-flight work and whether sweep cancellation propagates to child runs; those gaps matter for correct invocation.

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 100% and the run_id description already states it accepts a sweep id as well as a run id, so the description adds little parameter-level detail. Its mention of 'a whole sweep' echoes rather than extends the schema, which is consistent with the baseline 3 for fully-covered single-parameter tools.

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 (stop) and resource (run or sweep) with an added scope qualifier ('started from this session') that separates it from other run-level tools. It does not explicitly name which siblings it supersedes or differs from, so identification relies on the reader inferring against run_step/run_sweep/start_sweep.

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 'started from this session' implies a precondition for use, and 'or a whole sweep' hints at the sweep-cancellation case. However, there is no explicit when-to-use vs when-not-to-use guidance and no alternative tool is named for cases where the run was not started in this session.

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