Skip to main content
Glama

Cancel fal.ai Queue Request

fal_cancel_request
DestructiveIdempotent

Cancel a queued generative AI job before it begins processing, blocking it from running. Works only for requests still in queue.

Instructions

Cancel a queued request before it finishes processing. Only works while status is IN_QUEUE — requests already IN_PROGRESS or COMPLETED cannot be cancelled and this will return an error.

Args:

  • model_id (string): The same model id used when submitting, e.g. "fal-ai/minimax/video-01"

  • request_id (string): The request_id returned by fal_submit_request

Returns: A confirmation message once the cancellation is accepted.

Examples:

  • Use when: "Actually, cancel that video job I just started" -> cancel while still IN_QUEUE

  • Don't use when: the job is already IN_PROGRESS or COMPLETED (use fal_check_status to confirm first)

Error Handling:

  • Returns "Not found (404)" if the request_id is wrong

  • Returns an error if the request already started processing or completed (cannot be cancelled)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
model_idYesThe fal.ai model/endpoint id, e.g. "fal-ai/flux/dev", "fal-ai/flux-pro/kontext", or "fal-ai/minimax/video-01". Find valid ids with fal_list_models or at https://fal.ai/models.
request_idYesThe request_id returned by fal_submit_request when the job was queued.
Behavior4/5

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

Annotations indicate mutability (readOnlyHint=false) and destructiveness (destructiveHint=true). The description adds behavioral details: error if wrong status, 404 for invalid request_id, and confirmation on success. However, idempotentHint=true is not fully addressed as the behavior on re-cancellation of an already cancelled request is not specified.

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?

Approximately 150 words with clear sections (description, Args, Returns, Examples, Error Handling). Front-loaded with the core action. Every sentence adds value without redundancy.

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 simple cancellation tool with two required params and no output schema, the description fully covers purpose, usage conditions, error cases, and expected return. No gaps remain.

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?

Both parameters have schema descriptions covering 100% of parameters. The description's Args section adds only slight reinforcement of the schema, not substantial new meaning. Baseline of 3 is appropriate.

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?

Clearly states the action (cancel), target (queued request), and condition (before finishing). Distinguishes from siblings like fal_check_status and fal_submit_request by specifying the cancellation scope and status requirement.

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?

Explicitly mentions the only valid status (IN_QUEUE), provides examples of when to use and not use, and suggests using fal_check_status first to confirm status. This gives clear guidance and excludes inappropriate usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MalcolmXavier7/fal-mpc'

If you have feedback or need assistance with the MCP directory API, please join our Discord server