Skip to main content
Glama

Cancel a run

cancel_run
DestructiveIdempotent

Cancel a run that has not finished. Work already done is billed. Cancelling a finished run changes nothing.

Input Schema

NameRequiredDescriptionDefault
idYesThe run's id, as returned by create_run.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

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 readOnly=false, so the safety profile is covered. The description adds genuine non-annotation context: partial work is still billed, and cancelling a finished run changes nothing (consistent with the idempotent hint). It omits any auth/permission requirements or rate limits.

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?

Three short sentences, front-loaded with the core action and precondition, followed by the two consequential facts. No filler and nothing repeated from the title or annotations.

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?

For a single-parameter mutation with full annotation coverage, the definition covers the essential behavior including side effects. The only gap is that no output schema exists and the description does not say what is returned on success versus on a no-op cancel.

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%, with the schema describing the id as 'as returned by create_run'. The description adds nothing beyond that, so the baseline 3 applies – the schema does the work.

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) plus the resource (run) and adds a state precondition ('that has not finished'), which distinguishes it from read-only siblings like get_run, list_runs and wait_for_run. An agent knows exactly which operation this performs 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?

Gives clear usage context: use on runs that have not finished, and notes that calling it on a finished run is a harmless no-op. It does not name an alternative tool or state prerequisites (e.g., permissions), so it falls short of full when/when-not/alternatives guidance.

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