Skip to main content
Glama

runway_editVideo

Edit videos using text prompts and reference images through Runway's AI. Transform existing videos by describing desired changes, adjusting aspect ratios, and incorporating visual references for precise modifications.

Instructions

Edit a video using Runway Aleph. promptText is a prompt for the video. videoUri takes in a url of a video or a data uri of a video. Accepted Ratio values are 1280:720, 720:1280, 1104:832, 960:960, 832:1104, 1584:672, 848:480, 640:480. Use 1280:720 by default. It also accepts reference images, in the form of either a url or a base64 encoded image. Each reference image has a tag, which is a string that refers to the image from the user prompt. For example, if the user prompt is "IMG_1 on a red background", and the reference image has the tag "IMG_1", the model will use that reference image to generate the image.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptTextYes
ratioYes
referenceImagesNo
videoUriYes

Implementation Reference

  • The handler function for the 'runway_editVideo' tool. It sends a POST request to Runway's /video_to_video endpoint using the 'gen4_aleph' model, with parameters for prompt text, video URI, ratio, and optional reference images. It awaits task completion and returns the task details as JSON.
    async ({ promptText, videoUri, ratio, referenceImages }) => {
      const task = await callRunwayAsync("/video_to_video", {
        method: "POST",
        body: JSON.stringify({
          promptText,
          videoUri,
          ratio,
          ...(referenceImages && referenceImages.length > 0
            ? { references: referenceImages }
            : {}),
          model: "gen4_aleph",
        }),
      });
      return { content: [{ type: "text", text: JSON.stringify(task) }] };
    }
  • Zod schema defining the input parameters for the 'runway_editVideo' tool: promptText (string), videoUri (string), ratio (string), and optional referenceImages array of objects with uri and optional tag.
    {
      promptText: z.string(),
      videoUri: z.string(),
      ratio: z.string(),
      referenceImages: z
        .array(z.object({ uri: z.string(), tag: z.string().optional() }))
        .optional(),
    },
  • src/index.ts:155-183 (registration)
    Registration of the 'runway_editVideo' tool on the MCP server, including name, description, input schema, and handler function.
    server.tool(
      "runway_editVideo",
      `Edit a video using Runway Aleph. promptText is a prompt for the video. videoUri takes in a url of a video or a data uri of a video. Accepted Ratio values are 1280:720, 720:1280, 1104:832, 960:960, 832:1104, 1584:672, 848:480, 640:480. Use 1280:720 by default. It also accepts reference images, in the form of either a url or a base64 encoded image. 
    Each reference image has a tag, which is a string that refers to the image from the user prompt. For example, if the user prompt is "IMG_1 on a red background", 
    and the reference image has the tag "IMG_1", the model will use that reference image to generate the image.`,
      {
        promptText: z.string(),
        videoUri: z.string(),
        ratio: z.string(),
        referenceImages: z
          .array(z.object({ uri: z.string(), tag: z.string().optional() }))
          .optional(),
      },
      async ({ promptText, videoUri, ratio, referenceImages }) => {
        const task = await callRunwayAsync("/video_to_video", {
          method: "POST",
          body: JSON.stringify({
            promptText,
            videoUri,
            ratio,
            ...(referenceImages && referenceImages.length > 0
              ? { references: referenceImages }
              : {}),
            model: "gen4_aleph",
          }),
        });
        return { content: [{ type: "text", text: JSON.stringify(task) }] };
      }
    );
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 describes what the tool does (edit video) and lists accepted ratios and reference image usage, but lacks critical behavioral details: it doesn't mention whether this is a read-only or destructive operation, expected processing time, rate limits, authentication needs, error handling, or output format. The description covers functional aspects but misses operational traits essential for an AI agent.

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?

The description is appropriately sized and front-loaded, starting with the core purpose. It efficiently lists parameter details without unnecessary fluff. However, the explanation of reference images is slightly verbose (e.g., the example with 'IMG_1'), which could be tightened. Overall, most sentences earn their place by clarifying parameters, but minor improvements in brevity are possible.

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

Completeness3/5

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

Given the tool's complexity (video editing with 4 parameters), no annotations, and no output schema, the description is moderately complete. It covers parameter semantics well but lacks behavioral transparency and usage guidelines. For a tool with no structured safety or output information, it should provide more context on what the tool returns or potential side effects, leaving gaps that could hinder an AI agent's effective use.

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

Parameters5/5

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

The description adds significant meaning beyond the input schema, which has 0% schema description coverage. It explains that 'promptText' is a prompt for the video, 'videoUri' accepts a URL or data URI, 'ratio' has specific accepted values with a default of 1280:720, and 'referenceImages' include tags that link to user prompts. This compensates fully for the schema's lack of descriptions, providing clear semantics for all 4 parameters.

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: 'Edit a video using Runway Aleph.' It specifies the action (edit), resource (video), and technology (Runway Aleph), which distinguishes it from sibling tools like runway_generateVideo (generation) or runway_upscaleVideo (enhancement). However, it doesn't explicitly contrast with all siblings, such as runway_cancelTask or runway_getTask, leaving some ambiguity.

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 mentions 'promptText' and 'videoUri' but doesn't explain scenarios where editing is preferred over generating a new video (runway_generateVideo) or upscaling (runway_upscaleVideo). There's no mention of prerequisites, constraints, or typical use cases, relying solely on parameter descriptions without contextual advice.

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