Skip to main content
Glama

mcg_cancel_run

Destructive

Cancel a run from any non-terminal state before collecting (a collecting run's outputs are delivered and charged: 409). The cancel request is recorded immediately and returns run_id and cancel_requested true (and a note, for a running campaign); the platform kills the machine and terminalizes the run as state killed on its next orchestration tick (about 60 s). A running campaign's cancel takes several ticks (a tick is about 60 s), 3 or more while children are open: the parent winds down, its open children are cancelled (a collecting child finishes and counts), then settlement charges the done children's measured tokens and releases the rest of the hold. Poll mcg_get_run to observe the terminal 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": "mcg_cancel_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
run_idYesThe run id to cancel.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Despite destructiveHint=true already flagging mutation, the description adds substantial behavior: immediate recording, return payload (run_id, cancel_requested, optional note), asynchronous terminalization as 'killed' within about one tick, multi-tick campaign cancellation, child-run handling, and settlement charging. It does not contradict the annotation.

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?

The scoping constraint and immediate return are front-loaded, with timing and campaign detail following in logical order. It is dense and long for a one-parameter tool, but nearly every sentence carries operationally relevant behavioral information, so little is wasted.

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

Completeness5/5

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

With no output schema, the description supplies the return shape, the asynchronous timing model, edge cases for campaigns and children, and the recommended polling tool. An agent has everything needed to call this correctly and interpret the outcome.

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?

There is only one parameter, run_id, and schema description coverage is 100%, so the schema already fully documents it. The description does not add any format, constraint, or example beyond what the schema provides, making the baseline 3 appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Cancel) and resource (a run) and immediately narrows scope to non-terminal states, excluding collecting runs. The agent can distinguish it from mcg_run (start), mcg_get_run (observe), and mcg_fetch_artifacts without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly defines when cancellation is valid ('any non-terminal state before collecting') and when it fails ('a collecting run's outputs are delivered and charged: 409'). It also names the follow-up alternative, 'Poll mcg_get_run to observe the terminal state,' so the agent knows what to do next.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources