Skip to main content
Glama

Mostly Right

Cancel a run

cancel_run

Stops a run that is queued, held at the spend gate, or running. A run cancelled at the gate was never charged. 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/5.0
Behavior4/5

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

It discloses important behavioral outcomes beyond the annotations: a run cancelled at the gate was never charged, the call returns a run receipt with status cancelled, and a finished run cannot be cancelled and reports that. This is meaningful behavior info beyond the schema, though it doesn’t discuss expected_version or other side effects.

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?

The description is short and impactful: it leads with the main verb and scope, gives an example, and includes the critical failure/error path in a single extra sentence. Every part serves the ones or in doing so.

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

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

It covers the main cancel action, the refund-relevant at-gate behavior, and the finished-run error path, but it omits any explanation of expected_version and does not provide an output schema or return-fields breakdown. Given zero parameter coverage and no output schema, the description is helpful but not fully self-sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description only gives a raw example of run_id and does not explain the semantics of expected_version at all. Since schema description coverage is 0%, the description should carry the explanatory burden for both parameters; it does almost nothing to add meaning beyond the JSON structure.

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?

It states a specific action (Stops a run), the exact resource, and the lifecycle states it applies to (queued, held at spend gate, running). It also contrasts with get_run in the last sentence, distinguishing the cancel operation from the read operation.

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?

The description explicitly says when to use the tool (queued, held at the spend gate, running) and when not to (already finished runs), and it names the action to take instead (read get_run rather than retrying). That gives the agent direct guidance for handling the primary error case.

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