Skip to main content
Glama

Cancel a Replicate prediction

replicate_cancel_prediction
DestructiveIdempotent

Cancel an in-progress prediction to stop long-running jobs, such as video generation or LLM tasks, that are no longer needed.

Instructions

Cancel an in-progress prediction by its ID. Useful for long-running async jobs (video, large LLM) when the user no longer needs the result.

Args:

  • prediction_id (string): ID of the prediction to cancel (returned by an earlier generate_* call).

Returns: PredictionSummary with updated status (typically "canceled").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prediction_idYesID of the prediction to cancel.
Behavior4/5

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

Annotations include destructiveHint=true and idempotentHint=true. Description adds that the tool cancels in-progress predictions and returns a PredictionSummary with updated status (typically 'canceled'). This provides behavioral detail beyond annotations, such as the return type and typical outcome.

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 paragraphs: first states purpose and usage context, second lists args and returns. Every sentence is essential; no redundancy. Front-loaded with core action.

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?

Given the simple operation (cancel by ID), the description covers all needed aspects: purpose, when to use, parameter source, and expected result. No output schema exists, but the description adequately describes the return type.

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% for the single parameter prediction_id. Description adds context: 'returned by an earlier generate_* call,' which helps the agent understand the source of the ID, going beyond the schema's basic description.

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?

Description clearly states 'Cancel an in-progress prediction by its ID.' This is a specific verb+resource pair, and it distinguishes from sibling tool replicate_cancel_training which cancels training rather than predictions.

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?

Provides guidance: 'Useful for long-running async jobs (video, large LLM) when the user no longer needs the result.' This tells the agent when to use the tool. It also notes that the prediction_id comes from an earlier generate_* call, aiding context. Could explicitly mention when not to use, but clear enough.

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/sena-labs/replicate-mcp-server'

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