Skip to main content
Glama

Convert or resize an image file

convert_image_file

Converts image files to PNG, JPEG, TIFF, BMP, WebP or TGA and resizes them to prepare oversized or unsupported stills for Premiere Pro import.

Instructions

Write an image file in another format and/or size: PNG, JPEG, TIFF, BMP, WebP or TGA, chosen by the extension of output_path. Give width or height to resize keeping the aspect ratio, or both together with fit. Use it to make an oversized still lighter before importing, or to convert a format Premiere does not read. Returns the new file's format, width, height and size, and the source's size. Given a video file it converts the first frame (extract_frame_from_file picks any frame). Works on the file on disk with ffmpeg, not on the timeline; Premiere Pro is not needed. ffmpeg and ffprobe must be installed (see check_ffmpeg), else FFMPEG_NOT_FOUND.

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": {
      "path": "<path>",
      "output_path": "<output_path>"
    },
    "name": "convert_image_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
fitNoOnly when both width and height are given. "contain" (default): fit inside the box, aspect kept, result may be smaller in one direction. "cover": fill the box and crop the excess. "stretch": exactly width x height, aspect ignored.
pathYesAbsolute path of the source image.
widthNoTarget width in pixels. Alone: the height follows the aspect ratio. Omit both width and height to keep the size.
heightNoTarget height in pixels. Alone: the width follows the aspect ratio. Omit both width and height to keep the size.
qualityNoQuality 1-100 for JPEG and WebP. Default 90.
overwriteNoReplace output_path if it already exists. Default false: an existing file makes the tool fail with FILE_EXISTS.
output_pathYesAbsolute path of the image to write (must differ from path): .png, .jpg, .jpeg, .tif, .tiff, .bmp, .webp or .tga.
timeout_secondsNoStop ffmpeg and fail with TIMEOUT after this many seconds. Default 120.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Adds substantial context beyond the annotations: the ffmpeg/ffprobe dependency with the FFMPEG_NOT_FOUND failure and a pointer to check_ffmpeg, plus the FILE_EXISTS default behavior and TIMEOUT. It also discloses what happens for video input (first frame only) and what is returned. Minor gap: no explicit statement that an existing output file is destroyed when overwrite=true.

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?

Four sentences, front-loaded with the action and supported formats, then usage, then return values, then environment/error caveats. Dense but every clause carries information an agent needs before calling.

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

Completeness4/5

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

With no output schema, the description correctly states the return payload (new format, width, height, size, plus source size), and covers dependencies, error modes and offline scope for an 8-parameter mutation tool. Complete enough to call correctly without opening anything else.

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 coverage is 100% and the schema descriptions already explain fit, width/height aspect behavior, quality, overwrite and timeout. The description's resize sentence largely restates the schema, adding only the note that the output format is chosen by the extension of output_path. Baseline 3 applies.

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?

Starts with a specific verb+resource ("Write an image file in another format and/or size") and enumerates the supported formats and how the output format is selected. It is immediately distinguishable from the sibling that handles video frames, which it names explicitly.

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 two concrete use cases (lightening an oversized still before import, converting a format Premiere cannot read) and routes the frame-picking case to extract_frame_from_file. It also states the negative scope: works on the file on disk, not on the timeline.

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

Deploy Server

Other Tools