Skip to main content
Glama

runway_cancelTask

Cancel or delete a running video or image generation task to stop processing and free up resources when no longer needed.

Instructions

Deletes or cancels a given task.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYes

Implementation Reference

  • The handler function for runway_cancelTask. It performs a DELETE request to `/tasks/${taskId}` using the callRunway helper and returns a success message.
    async ({ taskId }) => {
      await callRunway(`/tasks/${taskId}`, { method: "DELETE" });
      return { content: [{ type: "text", text: `Task ${taskId} cancelled.` }] };
    }
  • Zod input schema defining the required 'taskId' parameter as a string.
    { taskId: z.string() },
  • src/index.ts:200-207 (registration)
    Registration of the runway_cancelTask tool using server.tool, specifying name, description, input schema, and inline handler function.
      "runway_cancelTask",
      "Deletes or cancels a given task.",
      { taskId: z.string() },
      async ({ taskId }) => {
        await callRunway(`/tasks/${taskId}`, { method: "DELETE" });
        return { content: [{ type: "text", text: `Task ${taskId} cancelled.` }] };
      }
    );
  • Utility function that makes HTTP requests to the Runway API with authentication headers, used by the tool handler for the DELETE operation.
    async function callRunway(
      path: string,
      opts: Partial<RequestInit> = {}
    ): Promise<unknown> {
      const res = await fetch(`${API_BASE}${path}`, {
        ...opts,
        headers: {
          Authorization: `Bearer ${SECRET}`,
          "X-Runway-Version": RUNWAY_VERSION,
          "Content-Type": "application/json",
          ...(opts.headers || {}),
        },
      } as RequestInit);
      if (!res.ok) throw new Error(`Runway ${res.status}: ${await res.text()}`);
      return res.json();
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('deletes or cancels') but doesn't clarify whether this is reversible, requires specific permissions, affects related resources, or has side effects like rate limits. This is a significant gap for a destructive operation.

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?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive tool with no annotations, 0% schema coverage, and no output schema, the description is incomplete. It lacks critical details like behavioral traits, parameter meaning, and expected outcomes, leaving the agent with insufficient context for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter with 0% description coverage, so the description must compensate. It mentions 'a given task' but doesn't explain what taskId represents (e.g., format, source, or constraints), adding minimal value beyond the schema's basic structure.

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?

The description clearly states the action ('deletes or cancels') and the target resource ('a given task'), which is specific and unambiguous. However, it doesn't differentiate this tool from its siblings (like runway_editVideo or runway_getTask), which would require a 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing task), exclusions, or sibling tools, leaving the agent to infer usage from context alone.

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/runwayml/runway-api-mcp-server'

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