Skip to main content
Glama

Dub a video into other languages

localize_video

Full automatic dubbing of an uploaded video: transcribe once, translate, voice every target language with its own voice and render a dubbed video per language. Each language returns an audio_url (voice track aligned to the original timeline - upload it to YouTube Studio as a multi-language audio track) and a final_video_url. Takes several minutes: returns job_guids immediately; poll get_localization_status. Confirm the cost with estimate_video_localization for long videos. Several characters (drama, film, interview)? Set multi_speaker = true: speakers are detected on the whole video and each one can get its own voice - pass speaker_voices per target if you already know them, otherwise the job pauses with current_step WaitingSpeakerVoices and get_localization_status lists the speakers with sample lines; ask the user which voice fits each character, then call set_speaker_voices.

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": {
      "video_url": "<video_url>",
      "source_language": "<source_language>",
      "targets": "<targets>"
    },
    "name": "localize_video"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetsYesOne entry per target language (the server allows 10 per job by default).
video_urlYespublic_url from create_upload_url.
multi_speakerNoDub each character with its own voice. Speakers are detected on the whole video (labels 0, 1, 2... in order of appearance).
source_languageYesSpoken language of the video, e.g. vi.
speaker_voice_stepNomulti_speaker without speaker_voices: pause for voice choice after transcription (srt) or after translation (translated, shows translated sample lines).srt
keep_original_voiceNoKeep the ORIGINAL voice in some parts instead of dubbing them (voice demos, cloned / AI voice samples, recordings played back, songs). Before the video is rendered, AI (Gemini Flash) picks those lines from the whole transcript and the dubbed video keeps the original audio there automatically. Costs a few extra credits, charged by tokens used.
keep_original_instructionNoWith keep_original_voice: what to keep, in the user's words, e.g. 'keep the original voice in every voice demo'. Empty = voice demos, recordings and songs.
original_audio_volume_percentNoKeep the original sound (music/effects) under the new voice at this volume in the dubbed video. 0 = remove.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / keep_original_instruction
      Added value: +{
      +  "description": "With keep_original_voice: what to keep, in the user's words, e.g. 'keep the original voice in every voice demo'. Empty = voice demos, recordings and songs.",
      +  "maxLength": 1000,
      +  "type": "string"
      +}
    • addedInput schema / properties / keep_original_voice
      Added value: +{
      +  "default": false,
      +  "description": "Keep the ORIGINAL voice in some parts instead of dubbing them (voice demos, cloned / AI voice samples, recordings played back, songs). Before the video is rendered, AI (Gemini Flash) picks those lines from the whole transcript and the dubbed video keeps the original audio there automatically. Costs a few extra credits, charged by tokens used.",
      +  "type": "boolean"
      +}
  2. Changed4 schema fields changed
    • addedInput schema / properties / multi_speaker
      Added value: +{
      +  "default": false,
      +  "description": "Dub each character with its own voice. Speakers are detected on the whole video (labels 0, 1, 2... in order of appearance).",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / speaker_voice_step
      Added value: +{
      +  "default": "srt",
      +  "description": "multi_speaker without speaker_voices: pause for voice choice after transcription (srt) or after translation (translated, shows translated sample lines).",
      +  "enum": [
      +    "srt",
      +    "translated"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / targets / items / properties / speaker_voices
      Added value: +{
      +  "additionalProperties": {
      +    "type": "string"
      +  },
      +  "description": "multi_speaker only: voice per speaker for this language, e.g. {\"0\": \"v1:...\", \"1\": \"v1:...\"}.",
      +  "type": "object"
      +}
    • changedInput schema / properties / targets / items / properties / voice / description
      Previous value: -"Voice token (v1:...) for that language from list_voices / favorites / custom voices."New value: +"Voice token (v1:...) for that language from list_voices / favorites / custom voices. With multi_speaker it is the default voice for speakers without their own."
  3. 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 the generic non-read-only, non-destructive, non-idempotent profile; the description supplies the operationally important traits: it takes several minutes and returns job_guids immediately, the job can pause at current_step WaitingSpeakerVoices, and keep_original_voice costs extra credits charged by tokens. It also warns about the 10-per-job server limit, which no annotation conveys.

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?

Front-loaded with the core action and the return values before branching into multi-speaker and cost details. It is dense but nearly every clause carries a decision-relevant fact; the YouTube Studio upload aside is the only mildly expendable sentence.

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 an 8-parameter async dubbing tool with no output schema, the description covers inputs, async contract (job_guids + polling), async return artifacts (audio_url, final_video_url), cost, multi-speaker state machine, and the follow-up call. Nothing essential to a correct first invocation is 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 baseline would be 3; the description still adds workflow meaning the schema cannot, notably that speaker_voices is optional and its omission triggers a pause, and that keep_original_voice works by having an LLM pick lines from the whole transcript. It doesn't explain volume or source_language format beyond the schema, so not a 5.

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?

Opens with a specific verb+resource+scope: 'Full automatic dubbing of an uploaded video', then enumerates the pipeline (transcribe, translate, voice, render). It clearly separates itself from siblings by naming estimate_video_localization, get_localization_status and set_speaker_voices as the tools for cost, polling and speaker-voice assignment.

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?

Gives explicit routing conditions: poll get_localization_status instead of waiting, confirm cost with estimate_video_localization for long videos, and set multi_speaker = true for drama/film/interview content. It also states the human-in-the-loop branch (job pauses at WaitingSpeakerVoices, ask the user, then call set_speaker_voices), which is exactly the kind of when/when-not guidance an agent needs.

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.