Skip to main content
Glama

cancel_script_run

DestructiveIdempotent

Cancel a script run that has not started yet. A running script runs to its end or its timeout.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
run_idYesA script run id (srun_...).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
callsYesEvery tool call the script made, in order.
errorNo
objectYes
outputNoWhat the script printed (the last 64,000 characters).
resultNoThe script's last expression, as JSON.
reusedNo
statusYes
next_stepNo
created_atYes
started_atNo
completed_atNo
wait_timed_outNoThe wait ended first. The work is still running: follow it with the tool next_step names.
timeout_secondsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/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/retry semantics are covered. The description adds genuinely new behavioral context: cancellation only succeeds for not-yet-started runs and cannot interrupt a running script. It doesn't say what error or state results if the run already started, which keeps it from a 5.

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, both load-bearing, with the eligibility constraint front-loaded before the failure-mode explanation. No filler whatsoever.

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?

An output schema exists, so return values need no explanation, and the key eligibility/timing semantics are present. Minor gap: no mention of what happens on an invalid or already-started run (error vs. silent no-op), which an agent could need for error handling.

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 and schema coverage is 100% (run_id documented with the srun_... token format), so the schema carries the semantics alone. The description adds nothing about run_id beyond what the schema states; baseline 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?

States a specific verb (cancel) and resource (script run) plus a scope constraint ('that has not started yet') that immediately distinguishes it from the sibling cancel_run and from wait/get variants. An agent knows exactly what this does 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?

The second sentence supplies an explicit condition under which this tool is NOT useful ('a running script runs to its end or its timeout'), effectively stating when-not-to-use. It stops short of naming the alternative tool to use for in-flight runs, so it is not a full 5.

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