Skip to main content
Glama

Edit a video from a description

edit_video

Change what a video shows from a written instruction. The new video keeps the clip's motion, camera, timing and sound, and changes only what you name: a colour ("make her shorts red"), clothes ("turn his shirt into a black hoodie"), an object added, removed or swapped, the background, the weather, the time of day or the season, or the whole look (anime, clay, film noir). With references it puts what the pictures show into the video: a face, an outfit, a product, a logo or a place. Read builtin-generative-video first: it has the prompt rules and says when to use replace_person or copy_motion instead. It edits 3 to 10 seconds of video: a video asset, a part of one (startSeconds and endSeconds), or a group of the film (group), whose clips it edits together as one picture. The new video is as long as what it edited: for a whole asset, play it with the clip's at, offset and duration; for a part, it starts at startSeconds, so play it at offset 0 where that part played; for a group, put it in the group in place of its tracks, at 0, so the group's look and transitions still apply. It answers at once with a Job ID and the media is made in the background: start every generation you need, keep working, then call wait_for_jobs with all their Job IDs to get each Asset ID for patch_film. Uses credits for each second of the clip: about 48 credits a second, or about 61 credits a second with references, so a 5-second clip uses 242 credits, or 305 with references.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "videoAssetId": "<videoAssetId>",
      "startSeconds": "<startSeconds>",
      "endSeconds": "<endSeconds>",
      "group": "<group>",
      "prompt": "<prompt>",
      "references": "<references>",
      "projectId": "<projectId>"
    },
    "name": "edit_video"
  }
}

Input Schema

NameRequiredDescriptionDefault
groupYesThe id of a <group> in the film to edit as one video, instead of an asset: everything it holds (its cuts, titles and overlays) is drawn together, without the group's own look, and edited as one picture. The group is 3 to 10 seconds long. null with videoAssetId.
promptYesThe change, in one or two plain sentences that name what changes and end with "Keep everything else the same.": "Make her white shorts bright red. Keep everything else the same." With references, call the video @Video1 and the pictures @Image1 to @Image4 by their order: "Replace the face of the man in @Video1 with the face in @Image1. Keep his hair, clothes and everything else the same." Up to 2000 characters.
projectIdYesThe project this call runs on without changing the open project. null (or leaving it out) uses the open project. wait_for_jobs takes the projectId of the calls that started the jobs.
endSecondsYesSource second of videoAssetId where the part to edit ends; null for both edits the whole video.
referencesYes1 to 4 pictures of what to put in (a face, an outfit, a product, a logo, a place), in this order, each in one of these forms: asset:ID, an image asset as it is; asset:ID#t=14.6, the frame of a video asset at 14.6 seconds; film:#t=3.2, the frame of the edit at 3.2 seconds. Use the IDs search_assets gives. null when the description says it all.
startSecondsYesSource second of videoAssetId where the part to edit starts, with endSeconds; null for both edits the whole video. Pass the part a clip plays (its offset to offset + duration) instead of importing that part first.
videoAssetIdYesThe video to edit: a ready video asset. What is edited (the whole video, or startSeconds to endSeconds of it) is 3 to 10 seconds, with references at least 720 pixels on each side. Use the IDs search_assets gives. null with group.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

The annotations mark this as a non-read-only, open-world, non-idempotent operation, and the description adds substantial context beyond them: asynchronous Job ID behavior, wait_for_jobs retrieval, credit cost per second, duration limits, and the fact that only named elements change. It does not contradict the annotations and fills in the operational workflow the agent needs.

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 dense and front-loaded, with each sentence carrying operational detail rather than filler. It could be slightly easier to scan with structure, but the length is justified by the tool's complexity.

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 complex generative tool with no output schema, the description covers prerequisites, asynchronous job handling, credit cost, duration constraints, reference formats, and how to place the result. Nothing critical for correct invocation appears to be missing.

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%, so the baseline is 3, but the description adds cross-parameter semantics: group versus videoAssetId alternatives, startSeconds/endSeconds as a source range, and how each editing mode should be placed on the timeline. Those relationships go beyond what the schema describes.

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?

States a specific verb and resource: changing what a video shows from a written instruction, while preserving motion, camera, timing and sound. It also makes the scope clear by listing the kinds of edits supported, so an agent can distinguish this from sibling tools without opening the schema.

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 directs the agent to read builtin-generative-video first and names replace_person and copy_motion as alternatives for specific cases. It also describes the three editing modes (whole asset, part, group) and how to use the resulting video, leaving little to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.