Skip to main content
Glama

AI Cancel

ai_cancel
DestructiveIdempotent

Cancel a pending AI generation before it starts at the provider to return unused credits.

Instructions

Cancel an AI generation that hasn't started at the provider yet; its credits come back.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/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 openWorldHint=true, so safety is partly covered. The description adds genuinely new context: the refund of credits and the hard precondition that the job must not have started, which the annotations do not convey.

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?

A single sentence that front-loads the action, states the precondition, and closes with the user-visible payoff (credits returned). Every clause earns its place.

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?

No output schema exists, and the description covers the key outcome (cancellation plus credit refund) so an agent knows what success means. It stops short of describing the failure path when a generation has already started, which is the main remaining gap.

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 ('id') with 0% schema description coverage; the description's reference to 'an AI generation' lets the agent infer that id identifies the generation/job, but it never states this or gives a format. Adequate inference rather than real added meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (cancel) and resource (an AI generation), plus a meaningful scope qualifier ('hasn't started at the provider yet'). That distinguishes it from siblings like ai_status, ai_list, and ai_download without naming them explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The precondition 'hasn't started at the provider yet' implicitly tells the agent when this applies, but there is no guidance on what to do when the generation has already started (e.g., fall back to ai_status) or when to prefer letting a job finish.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.