Skip to main content
Glama

Generate a fully-scored video (video output)

video_to_video_sound

Generate a new video with licensed music and sound effects mixed into its soundtrack from a local path or public URL in one call.

Instructions

Generate music AND sound effects for a video in one call and return a NEW VIDEO with the mixed soundtrack muxed in (not just an audio file). Use this instead of chaining video_to_video_music and video_to_video_sfx — the two layers are balanced against each other by the backend, and it is one charge. Provide either a local video path or a public video URL. Generation is asynchronous; this tool waits for completion and returns the saved video path. Music is fully licensed (via Shutterstock) and cleared for commercial use.

⚠️ COST WARNING: This tool makes an API call to Sonilo which may incur charges. Only use when explicitly requested by the user.

Args: video_path (str, optional): Absolute local path, or relative to SONILO_MCP_BASE_PATH. Supports .mp4/.mov/.webm/.m4v/.gif (gif must be animated). Subject to the account's max upload size (typically 300 MB). Maximum video duration is 480 seconds (8 minutes). video_url (str, optional): HTTPS URL to a video file. music_prompt (str, optional): Style hint for the music bed (max 2000 chars). sfx_prompt (str, optional): Description of the sound effects layered over the music (max 2000 chars). segments (list, optional): Per-segment SFX descriptions, each {"start": float, "end": float, "prompt": str}. Backend rules: first start must be 0; segments must be contiguous (each end == next start); every end > start; every prompt non-empty (max 200 chars); last end must not exceed the video duration; max 30 segments. Invalid segments are rejected before any charge. keep_original_sound (bool, optional): Keep the source video's whole original audio track in the result, with the generated music and effects combined under it. Defaults to False, so by default the returned video's audio is the generated music and effects ALONE and the source's own audio is removed — and the result carries no music_processed stem, since with no voice source there is no processed track. Supersedes preserve_speech. preserve_speech (bool, optional): Keep only the source's ISOLATED speech (not the whole track) in the result. Defaults to False. Superseded by keep_original_sound. ducking (bool, optional): How the voice and the generated bed are COMBINED — not whether a voice is kept. Defaults to False: a static voice-forward mix at a fixed offset. Pass True for the dynamic duck, where the bed dips only while the voice is present. Has no effect when there is no voice source, i.e. neither keep_original_sound nor preserve_speech is set. variants_num (int, optional): 1-10, default 1. Generate this many distinct combined-mix variants in one request. Cost scales linearly with N. Values above 1 are never covered by the free trial — even a trial account is billed for variants beyond the first. output_directory (str, optional): Where to save the result. Defaults to SONILO_MCP_BASE_PATH.

Exactly one of video_path and video_url must be provided.

Returns: TextContent with the saved .mp4 path. At variants_num > 1, one TextContent per variant, saved as -0.mp4, -1.mp4, ... On timeout the error message includes the task_id — recover with get_sfx_task.

Input Schema

NameRequiredDescriptionDefault
duckingNo
segmentsNo
video_urlNo
sfx_promptNo
video_pathNo
music_promptNo
variants_numNo
preserve_speechNo
output_directoryNo
keep_original_soundNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.28.0

TDQS

A5/5.0
Behavior5/5

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

Annotations only cover the generic safety profile (not read-only, open-world, non-idempotent); the description adds the substantive behavior: asynchronous generation with blocking wait, per-call and linearly scaling charges, trial exclusions for variants, licensed/cleared music, default removal of source audio, the keep_original_sound/preserve_speech interaction, and timeout recovery via get_sfx_task.

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?

It is long but front-loaded: purpose and sibling differentiation first, then a clearly flagged cost warning, then per-argument details, then returns. Each sentence carries actionable information (rules, defaults, interactions, recovery path) rather than restating the name or schema titles.

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 10-parameter, costly, asynchronous generation tool, nothing an agent needs is missing: input source rules, format/size/duration limits, segment constraints, variant output naming, timeout/task_id recovery, and billing caveats are all covered. Return values are additionally described despite an output schema existing.

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?

Schema description coverage is 0%, so the description carries the full burden and does: it documents defaults, formats and limits for video_path, backend validation rules for segments (contiguity, max 30, 200-char prompts), variants_num cost implications, output_directory default, and the precedence and no-voice no-op semantics of keep_original_sound, preserve_speech, and ducking.

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 opening sentence names a specific verb and resource ('Generate music AND sound effects for a video') and states the distinctive output ('return a NEW VIDEO with the mixed soundtrack muxed in (not just an audio file)'). It explicitly contrasts itself with the siblings video_to_video_music and video_to_video_sfx, so an agent can route correctly without inspecting schemas.

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?

It gives an explicit preference rule ('Use this instead of chaining video_to_video_music and video_to_video_sfx') with the reasons (backend balancing, single charge) and a hard gating condition ('Only use when explicitly requested by the user' due to cost). It also states the input exclusivity rule ('Exactly one of video_path and video_url must be provided').

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