Skip to main content
Glama

cancel_run

DestructiveIdempotent

Stop a run that is pending, running, or waiting for input. The run is finalized as failed with 'Cancelled by the caller'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
run_idYesA run id (trun_...).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
objectYes
resultNo
reusedNo
statusYes
chat_idNo
summaryNo
task_idYes
next_stepNo
task_nameNo
created_atYes
started_atNo
completed_atNo
error_messageNo
wait_timed_outNoThe wait ended first. The work is still running: follow it with the tool next_step names.
credits_consumedNo
pending_approval_idsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / next_step
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / wait_timed_out
      Added value: +{
      +  "description": "The wait ended first. The work is still running: follow it with the tool next_step names.",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / properties / status / enum
      Previous value: -[
      -  "pending",
      -  "running",
      -  "completed",
      -  "failed",
      -  "needs_input",
      -  "timed_out",
      -  "unknown"
      -]New value: +[
      +  "pending",
      +  "running",
      +  "completed",
      +  "failed",
      +  "needs_input",
      +  "timed_out",
      +  "unknown",
      +  "skipped"
      +]
  3. Changed1 schema field changed
    • changedOutput schema / properties / status / enum
      Previous value: -[
      -  "pending",
      -  "running",
      -  "completed",
      -  "failed",
      -  "needs_input",
      -  "timed_out"
      -]New value: +[
      +  "pending",
      +  "running",
      +  "completed",
      +  "failed",
      +  "needs_input",
      +  "timed_out",
      +  "unknown"
      +]
  4. Changed1 schema field changed
    • changedOutput schema / properties / status / enum
      Previous value: -[
      -  "pending",
      -  "running",
      -  "completed",
      -  "failed",
      -  "needs_input"
      -]New value: +[
      +  "pending",
      +  "running",
      +  "completed",
      +  "failed",
      +  "needs_input",
      +  "timed_out"
      +]
  5. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false, so the mutation profile is covered. The description adds the concrete outcome the annotations cannot convey: the run is finalized as failed with 'Cancelled by the caller', which tells the agent exactly what state to expect afterward.

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?

Two sentences, no filler, and the action plus eligible states are front-loaded ahead of the outcome detail. Every clause earns its place.

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?

For a single-parameter mutation tool with an output schema available, the description covers what it does, which runs are valid targets, and the resulting state. Nothing needed to invoke it correctly is missing.

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?

Only one parameter (run_id) at 100% schema coverage, and the schema already documents its trun_ prefix format. The description adds nothing beyond the schema, so the baseline of 3 applies.

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?

Specific verb ('Stop') plus resource ('a run') with the eligible states enumerated (pending, running, waiting for input). An agent can distinguish this from cancel_script_run and wait_for_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 Guidelines3/5

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

The eligible run states imply when the tool is applicable, but there is no explicit comparison to the sibling cancel_script_run or guidance on what to do instead for other run types. Usage is inferable but not stated.

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