Skip to main content
Glama

reformat_aspect_ratio

Convert video aspect ratios to 9:16, 1:1, 16:9, or 4:5 by adding blurred or solid padding, or cropping the center. Preview the FFmpeg plan with dryRun before encoding.

Instructions

Change video aspect ratio to 9:16 vertical, 1:1 square, or 4:5 portrait. Adds blurred video borders, solid padding, or center crops. Supports dryRun and post-flight verification.

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": "reformat_aspect_ratio"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoFormat mode: 'blur_background' adds blurred video borders, 'fit_pad' adds solid color padding, and 'crop_center' zooms and crops the center. Default: 'blur_background'.blur_background
dryRunNoPlan-before-encode: returns planned FFmpeg command, parameters, and target output without writing files.
padColorNoBackground color for fit_pad mode, such as 'black', 'white', or hex '0x1e1e2e'. Default: 'black'.black
inputPathYesPath to the source video file.
blurAmountNoBlur strength (5 to 50) for blur_background mode. Default: 20.
outputPathYesDestination path for the reformatted video.
targetRatioNoTarget aspect ratio: '9:16' for vertical reels, '1:1' for square, '16:9' for horizontal, or '4:5' for portrait. Default: '9:16'.9:16
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.7.1
    • addedInput schema / properties / dryRun
      Added value: +{
      +  "description": "Plan-before-encode: returns planned FFmpeg command, parameters, and target output without writing files.",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changedv0.5.1
    • addedInput schema / properties / padColor / pattern
      Added value: +"^(0x[0-9a-fA-F]{6}|#[0-9a-fA-F]{6}|[a-zA-Z]{3,20})$"
  3. 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."
  4. Changed7 schema fields changedv0.4.2
    • changedInput schema / properties / blurAmount / description
      Previous value: -"Blur intensity (5-50) for 'blur_background' mode. Default: 20"New value: +"Blur strength (5 to 50) for blur_background mode. Default: 20."
    • changedInput schema / properties / hardwareAcceleration / description
      Previous value: -"Whether to 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 source video file"New value: +"Path to the source video file."
    • changedInput schema / properties / mode / description
      Previous value: -"Reformatting mode. 'blur_background' adds an aesthetic blurred background of the video itself. 'fit_pad' adds solid colored padding. 'crop_center' zooms and crops the center."New value: +"Format mode: 'blur_background' adds blurred video borders, 'fit_pad' adds solid color padding, and 'crop_center' zooms and crops the center. Default: 'blur_background'."
    • changedInput schema / properties / outputPath / description
      Previous value: -"Destination path for the reformatted video"New value: +"Destination path for the reformatted video."
    • changedInput schema / properties / padColor / description
      Previous value: -"Background color when using 'fit_pad' mode (e.g. 'black', 'white', or hex '0x1e1e2e')"New value: +"Background color for fit_pad mode, such as 'black', 'white', or hex '0x1e1e2e'. Default: 'black'."
    • changedInput schema / properties / targetRatio / description
      Previous value: -"Target aspect ratio. '9:16' (Reels/Shorts/TikTok), '1:1' (Square), '16:9' (Landscape), '4:5' (Portrait Feed)"New value: +"Target aspect ratio: '9:16' for vertical reels, '1:1' for square, '16:9' for horizontal, or '4:5' for portrait. Default: '9:16'."
  5. Addedv0.3.0

TDQS

B3.2/5.0
Behavior2/5

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

With zero annotations, the description carries the full behavioral burden for a tool that writes a new video file. It hints at 'dryRun and post-flight verification' but never explains what verification checks or returns, and it says nothing about re-encoding quality, hardware fallback, overwriting an existing outputPath, or processing cost.

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 capability and no filler. The final clause about 'post-flight verification' is unexplained jargon that slightly undercuts an otherwise tight structure.

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?

For an 8-parameter, file-writing tool with no annotations and no output schema, the definition covers the what but not the consequences. An agent still cannot learn from it what the returned verification looks like or what happens to existing files at outputPath.

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%, with enums and ranges already documented, so the schema does the heavy lifting. The description's mention of blur borders, solid padding, and center crop echoes the mode enum descriptions rather than adding meaning, which is the expected baseline-3 outcome.

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?

Specific verb and resource ('Change video aspect ratio') with the concrete target ratios spelled out. It is easy to tell apart from siblings like compress_video or add_overlay, though it names no sibling explicitly and omits 16:9 even though the schema allows it.

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?

The description implies when the tool applies (reformatting to vertical/square/portrait), which is adequate for a self-describing transform. However, it gives no when-not guidance, no prerequisites, and never points to an alternative such as media_convert or create_split_screen when the goal differs.

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