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 0.091 credits a second, or about 0.11 credits a second with references, so a 5-second clip uses 1 credits, or 1 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?

Annotations only declare write/open-world/non-idempotent; the description adds substantial context beyond that: the call returns a Job ID immediately while media renders in the background, the agent must collect Job IDs and call wait_for_jobs, and each second costs roughly 0.091 (0.11 with references) credits. It also discloses the output duration rule and how to place the result back on the timeline, none of which the annotations convey.

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?

Purpose and the read-this-first pointer are front-loaded, and nearly every sentence carries operative information (supported edit categories, reference behavior, duration limits, async flow, cost). It is a dense paragraph with several long clauses about timeline placement, so it is efficient but not maximally scannable.

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 7-parameter, all-required generative tool with no output schema, the description covers what an agent needs: prerequisites, input duration bounds, the async job lifecycle with the follow-up call named, and exactly how to place the returned media for each of the three edit modes. Cost is also quantified, closing the main remaining uncertainty.

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; the description earns above that by explaining the cross-parameter relationship: a video asset, a startSeconds/endSeconds part, or a group are mutually exclusive modes, and a part should be passed as 'the part a clip plays (its offset to offset + duration)' rather than pre-imported. It does not restate the reference string forms or prompt format, which the schema already covers well.

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 ('Change what a video shows from a written instruction') and immediately scopes what is preserved (motion, camera, timing, sound) versus what may change. It names replace_person and copy_motion as the alternatives for adjacent operations, so an agent can separate this tool from its siblings without reading any 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 routes the agent: 'Read builtin-generative-video first' for prompt rules, and 'it ... says when to use replace_person or copy_motion instead.' It also states the conditions for using references versus prompt-only editing, and the 3-to-10-second input constraint, which is genuinely operative guidance rather than restated schema.

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.