Skip to main content
Glama

Cancel Task

cancel_my_task
DestructiveIdempotent

Stop one of your picture, video or sound jobs by its id. Pictures: works on queued and running tasks; pictures already made stay in your library. For a background batch, the cancel is sent to the picture maker: any picture not made is not charged and its tokens come back to you, and if the batch finishes first you keep all of them. Returns how many images were saved out of how many you requested. Videos (the job id or task id from generate_video or list_my_videos): a video still waiting to start is stopped and its tokens come back; one the video maker is already making cannot be stopped partway, and the answer says so. Sound (a generation_id or a rendering request_id): sound makers cannot stop a take partway, so the answer says whether it is finished or still being made. A finished video or sound is not removed here: use delete_my_videos or delete_my_audio.

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": {
      "taskId": "<taskId>"
    },
    "name": "cancel_my_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskIdYesThe id to stop: a picture task id (generate_image, list_generations), a video job id or task id (generate_video, list_my_videos), or a sound generation_id or request_id (generate_audio, list_my_audio).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / taskId / description
      Previous value: -"Task id from generate_image or list_generations."New value: +"The id to stop: a picture task id (generate_image, list_generations), a video job id or task id (generate_video, list_my_videos), or a sound generation_id or request_id (generate_audio, list_my_audio)."
  2. Changed1 schema field changed
    • changedInput schema / properties / taskId / description
      Previous value: -"Task id from generate_image or list_my_tasks."New value: +"Task id from generate_image or list_generations."
  3. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, but the description adds the specific consequences the annotations cannot express: finished pictures stay in the library, un-made pictures are not charged and tokens are refunded, a running video or sound take cannot be stopped partway, and a batch that finishes first keeps all tokens. These are exactly the outcomes an agent needs before invoking a destructive cancel.

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?

Dense but front-loaded, with the core action first and per-type behavior grouped under clear "Pictures:", "Videos", and "Sound" markers. It runs long as a single block and repeats the 'the answer says so' pattern, but nearly every clause carries distinct behavioral 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?

There is no output schema, so the description carries the return-value burden and does so: "Returns how many images were saved out of how many you requested," plus what the response reports for video and sound. Combined with the token-refund and partial-cancel rules, nothing material is missing for a one-parameter destructive cancel tool.

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% and the taskId description already enumerates accepted id sources, so the baseline is 3. The tool description earns a step above that by tying each id type to different cancel semantics (picture batch refunds, video pre-start cancel, sound non-interruptible), which the schema does not convey.

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?

Opens with a specific verb and resource ("Stop one of your picture, video or sound jobs by its id") and immediately scopes it across the three media types. An agent can distinguish this from delete_my_videos/delete_my_audio without opening any schema, since the description explicitly draws the cancel-versus-delete line.

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?

Gives per-media-type usage guidance (queued/running pictures, video job id or task id from generate_video/list_my_videos, sound generation_id or request_id) and names the alternatives for the out-of-scope case: "A finished video or sound is not removed here: use delete_my_videos or delete_my_audio." That is an explicit when-to-use and when-not-to-use routing.

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