Skip to main content
Glama

Cancel run

cancel_run
DestructiveIdempotent

Stop a run that is still in flight. Permanent — a cancelled run cannot be resumed.

Credits already spent are not refunded and finished lines are not delivered. Without confirm=true nothing is cancelled: you get the run's current state to show the user. Already-finished runs are returned unchanged.

Input Schema

NameRequiredDescriptionDefault
run_idYesThe run_id from run_workflow or list_runs.
confirmNofalse cancels nothing and reports what would stop. true stops the run permanently.
workflow_idYesThe workflow_id from list_workflows. Never invent one.

Output Schema

NameRequiredDescriptionDefault
run_idNo
statusNo
cancelledNo
next_stepNo
total_stepsNo
finished_stepsNo
workspace_slugNo
requires_confirmationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, and the description adds real substance on top: irreversibility ('cannot be resumed'), cost consequences ('credits already spent are not refunded'), partial-output loss ('finished lines are not delivered'), and the no-op behavior for already-finished runs. This is exactly the context an agent needs before a destructive call.

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?

Four short sentences, front-loaded with the action and its permanence, then consequences, then the confirm gate. No filler and nothing buried.

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 an output schema present, return-value detail is unnecessary, and the description covers the remaining agent-relevant facts: irreversibility, billing/partial-output effects, confirmation semantics, and the already-finished edge case. Nothing material is missing for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description goes beyond the schema by framing confirm=false as a preview to 'show the user' and clarifying that confirm=true is what makes the stop permanent. It reinforces rather than merely repeats the parameter docs, though it adds no new format or constraint detail.

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?

The description opens with a specific verb and resource ('Stop a run') plus a scope qualifier ('still in flight'), which cleanly separates it from read-oriented siblings like get_run_status, list_runs, and download_run. An agent can identify the operation without opening the schema.

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?

It states the operative condition ('a run that is still in flight') and explains the confirm=false dry-run path versus the confirm=true path, which is genuine when-to-use guidance. It stops short of naming an alternative tool (e.g., get_run_status) for agents that only want to inspect state.

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