Skip to main content
Glama

Cancel a generation

cancel_generation
Destructive

Stop one of your takes that is still queued or being generated, so it no longer waits or uses your allowance; generationId is the id speak returned. A take that already finished is answered with cancelled: false and its status. Returns a confirmToken first: tell the user which take will be stopped, then call again with the token.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "generationId": "<generationId>"
    },
    "name": "cancel_generation"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmTokenNoFrom the previous answer's next.args.
generationIdYesThe id returned by the speak tool.

Output Schema

NameRequiredDescriptionDefault
statusYes
cancelledYes
generationIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations' destructiveHint/readOnlyHint profile, the description discloses the two-call confirmation protocol: the first call returns a confirmToken, the agent must tell the user which take will be stopped, then call again with the token. It also explains the user-facing consequence (stops waiting and stops consuming allowance), which is exactly the behavioral context an agent needs for a destructive action.

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?

Two tightly packed sentences that front-load the purpose before the confirmation workflow, with no filler. The first sentence is slightly run-on ("so it no longer waits or uses your allowance"), but every clause carries operational information.

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 two-parameter destructive tool with an output schema, this covers everything needed to invoke it correctly: the precondition on generation state, the mandatory two-step confirmation with the user, and the behavior when the target is already complete. Return-value details are correctly left to the output schema.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, and the description genuinely adds meaning by explaining where each parameter comes from: generationId is the id speak returned, and confirmToken arrives in a prior response as part of the confirmation step. It does not document format or length constraints, but those are already in the schema.

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?

The description opens with a specific verb and resource ("Stop one of your takes") and narrows the scope to takes that are "still queued or being generated," which immediately separates it from status-checking tools like get_generation. An agent can tell exactly what 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?

It gives clear conditions for use (a take still queued or in progress) and states the outcome for the edge case where the take already finished (cancelled: false with its status). It does not explicitly name an alternative such as get_generation for checking state first, but the usage context is unambiguous.

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