Skip to main content
Glama

Cancel a run

cancel_run

Stops a run that is queued, held at the confirmation gate, or running. A run cancelled at the gate never ran. Example: {"run_id": "…"}. Returns the run receipt with status cancelled. A run that already finished cannot be cancelled and says so — read get_run rather than retrying.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
run_idYes
expected_versionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly=false, destructive=false, idempotent=false), but the description adds real behavioral context: which run states are cancellable, that a gate-cancelled run never ran, that it returns a receipt with status cancelled, and that finished runs reject the call. It stops short of stating what happens on a repeated cancel of an in-flight run, which idempotentHint=false makes relevant.

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?

Four short sentences, front-loaded with the core action and states before the example and the error case. The embedded JSON example is compact and earns its place by pinning run_id, though it borders on redundant with the schema.

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

Completeness4/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 correctly describes the return (run receipt with status cancelled) and covers the failure path. The only real gap is the undocumented expected_version parameter and the repeat-cancel behavior implied by idempotentHint=false.

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%, so the description must carry the parameter burden. The inline example documents run_id's shape, but expected_version (an optimistic-concurrency integer) is never mentioned in either the schema or the description, leaving one of two parameters fully unexplained.

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 (stops/cancels) and resource (a run), and enumerates the exact states it applies to (queued, held at the confirmation gate, running). An agent can distinguish this from start_run, get_run, and confirm_run 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 names the conditions for use (queued, at gate, running) and the when-not case (already finished) plus the correct alternative (read get_run rather than retrying). This is exactly the when/when-not/alternative guidance the dimension asks for.

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