Skip to main content
Glama

Replace a person in a video

replace_person

Replace a person in a video with someone from a picture, keeping the scene, the camera and the moves: put the user into a trend clip, or swap two people for two others. The new video is as long as the video, in whole seconds. To use part of a longer video, make an asset of that part first: download_asset gives its link, and import_asset_url with startSeconds and endSeconds imports only that part. 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 video: about 48 credits a second at standard and about 64 credits a second at pro, so a 10-second clip uses 478 credits at standard.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesWho replaces whom. Call the video @Video1 and the pictures @Image1 to @Image4 in their order: "Replace the man on the left in @Video1 with the person in @Image1, and the woman on the right with the person in @Image2. Keep everything else the same." Up to 2000 characters.
qualityYesstandard for most videos. pro keeps faces, hands and fine detail sharper, and uses more credits.
keepSoundYesnull or true (the default) keeps the video's sound, such as the song of a dance trend. false makes the new video silent.
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.
referencesYes1 to 4 pictures of the people to put in, 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. A face and clothes come from the picture.
videoAssetIdYesThe video to recast: a ready video asset of 3 to 10 seconds, at least 720 pixels on each side.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare the generic write/openWorld profile; the description adds what they cannot: it returns a Job ID immediately while media renders in the background, the completion path is wait_for_jobs -> Asset ID -> patch_film, output length equals input length in whole seconds, and it costs about 48 credits/second standard and 64/second pro. That is exactly the operational context an agent needs. Minor quibble: the worked example is arithmetically off (10s x 48 = 480, stated as 478), a small risk of cost misestimation.

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?

Front-loaded with the core action and examples, then ordered into length constraint, trimming escape hatch, async lifecycle, and cost. Every sentence carries distinct information; nothing is restated from the title or schema.

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?

With no output schema, the description takes on the full burden and discharges it: the immediate return (Job ID), the polling tool (wait_for_jobs), and the downstream consumer (patch_film). Combined with the 3-10s / 720px input constraint from the schema, an agent has everything needed to invoke and follow through.

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?

Schema description coverage is 100%, so the schema already documents prompt, quality, keepSound, projectId, references and videoAssetId in detail. The description reinforces the credit implication of the quality enum and the duration/length framing, but adds no syntax, format, or constraint beyond what the schema provides, making the baseline 3 correct.

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?

The first sentence names a specific verb+resource ("Replace a person in a video with someone from a picture") and adds the invariants it preserves (scene, camera, moves). It then distinguishes concrete use cases ("put the user into a trend clip, or swap two people for two others"), so an agent can separate it from cutout_person, edit_video, or generate_video without opening a schema.

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?

It gives explicit routing for a real alternative path: to work on part of a longer video, "make an asset of that part first: download_asset gives its link, and import_asset_url with startSeconds and endSeconds imports only that part." It also prescribes the async pattern (start all jobs, keep working, then wait_for_jobs). What it does not do is state when NOT to use this tool versus neighboring generators/editors, so it stops short of a 5.

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.