Skip to main content
Glama

Cancel job or batch

flow_cancel
Destructive

Cancels a queued or running generation job, or every unfinished take in a batch. Submitted generations may still finish because credits are already spent.

Instructions

Cancels a queued/running job, or every unfinished take of a batch. A generation already submitted to Flow may still finish on Flow's side (credits already spent).

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": {
      "id": "<id>"
    },
    "name": "flow_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesjob_id or batch_id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.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 and readOnlyHint=false, so the bar is lower, yet the description adds genuinely new behavior: a submission already handed to Flow may still complete and credits are already spent. That is actionable irreversibility context an agent cannot get from annotations. It stops short of saying what happens when the id is unknown or already finished.

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 short sentences, zero filler, with the action and its dual scope stated first and the risk caveat second. Every clause carries information the agent needs.

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 one-parameter destructive tool with no output schema and good annotation coverage, the description covers purpose, scope, and the key side-effect caveat. The remaining gap is what the call returns or whether it is idempotent on an already-cancelled id, which is minor given no output schema is defined.

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 "job_id or batch_id" is already documented in the schema, giving a baseline of 3. The description adds some meaning by explaining that a batch_id triggers cancellation of every unfinished take, but it does not clarify format, whether a job id inside a batch can be targeted individually, or what an id mismatch returns.

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?

"Cancels a queued/running job, or every unfinished take of a batch" gives a specific verb (cancels) plus two precisely scoped resources (single job vs. all unfinished takes of a batch). An agent can tell exactly what it targets without opening the schema. It does not name a sibling as contrast, but none of the listed siblings are cancel operations, so ambiguity risk is low.

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 state precondition ("queued/running") implies when cancellation is meaningful, and the batch wording implies when to pass a batch id. However, there is no explicit when-not guidance, no mention of behavior on an already-completed job, and no reference to alternatives such as flow_get_queue_status for inspecting before cancelling.

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