Skip to main content
Glama

Swap face in video

swap_face_in_video

Use only with the user's own likeness or content they are authorized to use. Do not use for impersonation, deception, sexual content, or content involving minors.

Swaps faces in an existing video: all faces with a reference image, or selected faces using detect_faces results. Starts a background job that costs credits; returns a project id for wait_for_video_project.

Input Schema

NameRequiredDescriptionDefault
nameNoGive your video a custom name for easy identification.Face Swap - dateTime
styleNoStyle of the face swap video.
assetsYesProvide the assets for face swap. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used
end_secondsYesEnd time of your clip (seconds). Must be greater than start_seconds.
start_secondsYesStart time of your clip (seconds). Must be ≥ 0.

Output Schema

NameRequiredDescriptionDefault
idYesUnique ID of the video. Use it with the [Get video Project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch status and downloads.
credits_chargedYesThe amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video. If video generation fails, credits will be refunded, and this field will be updated to include the refund.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Adds substantial context beyond the annotations: it is asynchronous (starts a background job), it consumes credits, and it returns a project id that must be fed to wait_for_video_project. It does not disclose limits such as max clip length or failure/refund behavior, which matters for a paid async job.

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?

Two compact paragraphs with no filler: policy first, then mechanics. The policy block is slightly long relative to the operation description, but every sentence carries information the agent must respect.

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?

Output schema exists so return values need no explanation, and the description still correctly flags chaining to wait_for_video_project. The only gap is operational detail (job duration, credit amount, clip-length limits) for a paid, open-world operation.

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 description only needs to add value. It does reinforce the mutual exclusivity of the two face_swap_mode branches, but that is already stated in the schema, so this lands at the baseline.

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+resource (swaps faces in an existing video) and enumerates the two operating modes (all faces via reference image, or selected faces via detect_faces results). The 'video' scope cleanly separates it from swap_face_in_photo and swap_head_in_photo in the sibling list.

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?

Explicitly states when NOT to use it (impersonation, deception, sexual content, minors) and the authorization requirement, and points to detect_faces results as the prerequisite for the individual-faces path. It does not say when to prefer swap_face_in_photo or replace_character_in_video, so routing between siblings is only partially covered.

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.