Skip to main content
Glama

media_convert

Convert video and audio files between formats using web MP4, WebM, and GIF presets; enable hardware acceleration when available.

Instructions

Convert video and audio files between formats. Includes presets for web MP4 (H.264/AAC), WebM (VP9/Opus), and animated GIF. Supports hardware acceleration on Apple Silicon, NVIDIA, Intel, and AMD.

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": {
      "inputPath": "<inputPath>",
      "outputPath": "<outputPath>"
    },
    "name": "media_convert"
  }
}

Input Schema

NameRequiredDescriptionDefault
crfNoQuality factor from 0 to 51. Lower numbers mean higher quality. Default: 23 for MP4, 30 for WebM.
fpsNoTarget frame rate in frames per second, such as 30, 60, or 15
presetNoEncoding preset: 'web_mp4' for browser playback, 'webm' for WebM video, 'gif' for animated GIF, or 'auto'. Default: 'auto'.
inputPathYesPath to the source media file to convert
outputPathYesDestination path for the converted file (e.g. ./output.mp4, ./output.webm, ./animation.gif)
resolutionNoTarget size formatted as 'WIDTHxHEIGHT', such as '1920x1080' or '1280x720'
hardwareAccelerationNoUse hardware-accelerated video encoding (VideoToolbox, NVENC, QSV, etc.) when available. Default: true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.1
    • addedInput schema / properties / resolution / pattern
      Added value: +"^\\d{2,5}x\\d{2,5}$"
  2. Changed1 schema field changedv0.5.0
    • changedInput schema / properties / hardwareAcceleration / description
      Previous value: -"Use Apple Silicon VideoToolbox encoding when available. Default: true."New value: +"Use hardware-accelerated video encoding (VideoToolbox, NVENC, QSV, etc.) when available. Default: true."
  3. Changed7 schema fields changedv0.4.2
    • changedInput schema / properties / crf / description
      Previous value: -"Constant Rate Factor quality (0-51). Lower is higher quality. Default: 23 for H.264, 30 for VP9."New value: +"Quality factor from 0 to 51. Lower numbers mean higher quality. Default: 23 for MP4, 30 for WebM."
    • changedInput schema / properties / fps / description
      Previous value: -"Target frame rate, e.g. 30, 60, or 15 (great for GIFs)"New value: +"Target frame rate in frames per second, such as 30, 60, or 15"
    • changedInput schema / properties / hardwareAcceleration / description
      Previous value: -"Use Apple Silicon VideoToolbox hardware acceleration if available (default: true)"New value: +"Use Apple Silicon VideoToolbox encoding when available. Default: true."
    • changedInput schema / properties / inputPath / description
      Previous value: -"Path to the input media file"New value: +"Path to the source media file to convert"
    • changedInput schema / properties / outputPath / description
      Previous value: -"Destination file path (e.g. ./output.mp4)"New value: +"Destination path for the converted file (e.g. ./output.mp4, ./output.webm, ./animation.gif)"
    • changedInput schema / properties / preset / description
      Previous value: -"Encoding preset. 'web_mp4' ensures universal browser playback (H.264/yuv420p/faststart). 'gif' uses 2-pass palette generation."New value: +"Encoding preset: 'web_mp4' for browser playback, 'webm' for WebM video, 'gif' for animated GIF, or 'auto'. Default: 'auto'."
    • changedInput schema / properties / resolution / description
      Previous value: -"Target resolution, e.g. '1920x1080', '1280x720', '640x360'"New value: +"Target size formatted as 'WIDTHxHEIGHT', such as '1920x1080' or '1280x720'"
  4. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / hardwareAcceleration
      Added value: +{
      +  "description": "Use Apple Silicon VideoToolbox hardware acceleration if available (default: true)",
      +  "type": "boolean"
      +}
  5. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose useful behavior beyond the schema: the codec pairings behind each preset and the hardware-acceleration backends supported per platform. It omits key operational traits for a file-writing tool, such as whether an existing outputPath is overwritten, whether the input is modified, and how long-running or failure cases are surfaced.

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?

Three short sentences, front-loaded with the core action and followed by presets and hardware support in descending order of importance. No filler, though the hardware-platform list is the least decision-relevant sentence for an agent choosing whether to call the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema and no annotations, so the description should do more for a 7-parameter mutation tool. It covers formats and acceleration but leaves the return value, overwrite behavior, and error semantics unexplained, which matters for an agent that must supply an outputPath.

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, but the description genuinely adds meaning by mapping preset names to concrete codecs (H.264/AAC, VP9/Opus) and by naming the hardware acceleration backends (Apple Silicon, NVIDIA, Intel, AMD) that the schema only gestures at with 'etc.'. It still says nothing about crf, fps, or resolution trade-offs, so it stops short of a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Convert video and audio files between formats') and enumerates the output presets, so the core operation is unambiguous. It does not differentiate the tool from close siblings such as compress_video, extract_audio, or reformat_aspect_ratio, leaving overlap to be inferred.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: an agent can infer this is for container/codec conversion, and the preset list hints at web-delivery use cases. There is no explicit statement of when to choose this over compress_video or extract_audio, and no prerequisites or exclusions are given.

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