Skip to main content
Glama

runway_getTask

Retrieve task status and results from Runway API operations. Check if video or image generation tasks have completed successfully, failed, or are still processing.

Instructions

Get the details of a task, if the task status is 'SUCCEEDED', there will be a 'url' field in the response. If the task status is 'FAILED', there will be a 'error' field in the response. If the task status is 'PENDING' or 'RUNNING', you can call this tool again in 5 seconds to get the task details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYes

Implementation Reference

  • The handler function for the 'runway_getTask' tool. It fetches the task details from the Runway API endpoint `/tasks/${taskId}` using the `callRunway` helper and returns the result as a JSON string in the response content.
    async ({ taskId }) => {
      const task = await callRunway(`/tasks/${taskId}`);
      return { content: [{ type: "text", text: JSON.stringify(task) }] };
    }
  • The input schema for the 'runway_getTask' tool, defining a single required parameter 'taskId' as a string.
    {
      taskId: z.string(),
    },
  • src/index.ts:186-196 (registration)
    The registration of the 'runway_getTask' tool on the MCP server, specifying the tool name, description, input schema, and handler function.
    server.tool(
      "runway_getTask",
      "Get the details of a task, if the task status is 'SUCCEEDED', there will be a 'url' field in the response. If the task status is 'FAILED', there will be a 'error' field in the response. If the task status is 'PENDING' or 'RUNNING', you can call this tool again in 5 seconds to get the task details.",
      {
        taskId: z.string(),
      },
      async ({ taskId }) => {
        const task = await callRunway(`/tasks/${taskId}`);
        return { content: [{ type: "text", text: JSON.stringify(task) }] };
      }
    );
  • Helper function used by the 'runway_getTask' handler to make authenticated API calls to the Runway service.
    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();
    }
Behavior4/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 effectively describes key behaviors: the response varies by task status (e.g., 'url' for 'SUCCEEDED', 'error' for 'FAILED'), and it specifies retry timing (5 seconds for 'PENDING' or 'RUNNING'). This adds valuable context beyond basic input-output, though it could mention error handling or rate limits.

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 appropriately sized and front-loaded, with three sentences that each add value: the first states the purpose, the second details response fields by status, and the third provides retry guidance. There is no wasted text, making it efficient and well-structured.

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?

Given the tool's moderate complexity (1 parameter, no output schema, no annotations), the description is fairly complete. It covers purpose, response behavior, and usage timing, but lacks details on parameter meaning, error cases beyond 'FAILED', or integration with sibling tools. This leaves minor gaps in full contextual understanding.

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?

The input schema has 1 parameter with 0% description coverage, so the description must compensate. It doesn't explicitly mention the 'taskId' parameter or its semantics, leaving it undocumented. However, the context implies the parameter is used to identify a task, providing minimal but insufficient detail for full understanding.

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 tool's purpose: 'Get the details of a task.' It specifies the verb ('Get') and resource ('task'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'runway_cancelTask' or 'runway_getOrg', which prevents a perfect score.

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?

The description provides clear context on when to use this tool: to retrieve task details, with specific guidance on retrying for 'PENDING' or 'RUNNING' statuses. It implies usage for monitoring task progress but doesn't explicitly state when not to use it or name alternatives among siblings, such as for task cancellation or editing.

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