Skip to main content
Glama

Cancel a generation

cancel_generation
DestructiveIdempotent

Cancels one of your generations that is still running and refunds its credits in full. If it finishes right before the cancel lands, you keep the result and nothing is refunded. Calling this on an already-terminal generation is safe and returns its current state (no double refund). Prefer lifecycle_status over the legacy status word. Does not claw back upstream compute already spent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
generation_idYesThe generation id returned by generate_image or generate_video.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnly=false, destructive=true, idempotent=true) by disclosing the race-condition outcome (finishing just before the cancel lands means you keep the result and no refund), the no-double-refund guarantee, and that upstream compute spend is not clawed back. These are exactly the mutation consequences an agent needs before calling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and refund, then layered with edge cases in short sentences; nothing is filler. The single cryptic lifecycle_status sentence is the only slightly wasteful/ambiguous element.

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 one-parameter mutation with annotations covering the safety profile and no output schema, the description supplies everything an agent needs: refund behavior, race semantics, idempotency, and the shape of the return ('its current state').

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 description coverage is 100% and the single parameter already documents its origin (generate_image or generate_video), so the baseline is 3. The description adds no format, validity, or lookup guidance beyond what the schema states.

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 and resource ('Cancels one of your generations that is still running') plus the side effect (full credit refund). An agent can distinguish it from get_generation or generate_image without opening a 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?

Implies when to use it (running generations, expecting a refund) and explicitly says calling it on a terminal generation is safe, which prevents wasted agent caution. It stops short of naming an alternative tool for inspection or recovery, and the 'Prefer lifecycle_status over the legacy status word' hint is unexplained.

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