Skip to main content
Glama

Merge Media

merge_media

Join media files end to end, in order, into one file. Pass video_urls to join 2 to 25 videos, or audio_urls to join audio files, not both. Returns a job immediately; check_job returns the permanent URL once it is completed. A failed job is refunded automatically.

Videos cost 2 credits, plus 1 for each clip that needs cropping or padding. The first video sets the canvas unless canvas_video_index names another. video_fit=auto or crop center-crops mismatched clips; pad keeps the full frame with bars; strict refuses different aspect ratios. Clips are never stretched. To join more than 25, join the first 25, then join that result with the rest.

Audio costs 2 credits. Tracks are concatenated as mp3, m4a or wav. crossfade_seconds overlaps adjacent tracks with equal-power fades, and each join shortens the output by that much. normalize_loudness matches each source's loudness first (target_lufs, default -18). One job joins at most 5 files; when more are passed, only the first 5 are joined and check_job returns continuationRequired with nextAudioUrls. Keep the same settings and repeat until no continuation is requested.

To put a soundtrack on a video use add_audio_to_video; to burn on a logo use overlay_images; to build a video from images and clips use stitch_clips.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "merge_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
force_newNoAn identical request submitted in the last 10 minutes returns that job without charging again; true generates it again.
pad_colorNoBar color for video_fit=pad. Default: black.
video_fitNoHow clips of a different shape fit the canvas. Default: auto.
audio_urlsNoAudio files in order. Only the first 5 are joined per job.
target_fpsNoOutput frame rate, 1 to 60. Default: the lowest input frame rate.
video_urlsNo2 to 25 videos in playback order. Pass this or audio_urls.
skills_usedNoOptional workflow analytics: names of the skills (or skill/reference paths) followed for this call. Stored with generation jobs only. Never include private data, local paths or media URLs.
target_lufsNoAudio: target loudness, -30 to -5. Default: -18.
audio_formatNoAudio output. Default: wav for WAV-only inputs, m4a for AAC-only inputs, otherwise mp3.
budget_projectNoOptional budget project this generation's cost counts toward, for tracking spend per client or job. Pass its slug; an id or the exact display name also works. Create one with create_budget_project and find slugs with list_budget_projects. An unknown project never stops the generation: it runs without one, and the result warns how to add it with assign_to_budget_project.
crossfade_secondsNoAudio: overlap each adjacent pair, 0 to 30 seconds.
canvas_video_indexNoZero-based index of the video that sets the canvas. Default: 0.
normalize_loudnessNoAudio: match each input's loudness before joining.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations, it discloses the async job model, that check_job returns the permanent URL, that failed jobs are auto-refunded, per-clip credit costs, and the audio 5-file cap with continuationRequired/nextAudioUrls semantics. The only gap is that force_new's 10-minute dedupe window is described only in the schema, not the description.

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 either/or input rule are front-loaded, then video behavior, then audio behavior, then sibling routing. It is dense and largely waste-free, though the audio paragraph's continuation-loop instructions are somewhat verbose relative to the schema's own maxItems note.

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 13-parameter, zero-required, async mutation tool with no output schema, the description covers the job lifecycle, cost model, refund behavior, batching limits, and alternatives. Nothing an agent needs in order to call it and follow up correctly appears 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 the baseline is 3; the description earns above that by explaining the meaning of the video_fit enum values (center-crop, bars, refuse mismatched ratios), that clips are never stretched, that the first video sets the canvas, and that crossfade shortens the output by the fade duration.

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 plus the ordering semantics: "Join media files end to end, in order, into one file." It immediately disambiguates from the nearest siblings by naming add_audio_to_video, overlay_images, and stitch_clips with their respective purposes.

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 states the mutually exclusive input modes (video_urls OR audio_urls, "not both"), the 2-to-25 video range, and gives explicit routing rules for the three sibling tools. It also supplies a concrete workaround for exceeding 25 videos (join in batches), leaving no inference needed.

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.