Skip to main content
Glama

host.runs.cancel

Stop a queued or running job: its sandbox process is killed within ~2s and the run reads cancelled. A run that already finished fails with run_not_cancellable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
run_idYesThe run id to cancel.
tenant_keyNoThe key `signup` returned. Required only when this connection carries no Authorization: Bearer header -- when both are present, the header wins.

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?

With no annotations, the description carries the full burden and does well: it discloses the sandbox process is killed within ~2s, the run transitions to cancelled, and the exact failure mode for finished runs. It omits auth/permission requirements and whether the operation is idempotent, but the safety-relevant behavior is well covered.

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 tight sentences, front-loaded with the action and immediately followed by timing and error semantics. No wasted words.

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 two-parameter mutation tool with no annotations or output schema, the description covers the essential behavior, timing, and failure case. Only auth/permission expectations are left unaddressed.

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 coverage is 100%, so both run_id and tenant_key are already fully documented in the schema. The description adds no parameter-level detail beyond what the schema provides, making the baseline 3 appropriate.

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 (Stop/cancel) and resource (queued or running job) with precise scope. It clearly distinguishes itself from sibling run tools like host.runs.get, host.runs.wait, and host.runs.purge by naming the run states it acts on.

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?

Specifies the conditions under which it works (queued or running) and when it fails (already-finished run returns run_not_cancellable). It doesn't explicitly name alternative siblings such as runs.purge or runs.wait, so it stops short of full routing 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