Skip to main content
Glama

Convert Image Tool

convert_image

Convert a picture to another format (jpeg, png, webp, gif, bmp, avif, ico, tiff), optionally resized (width/height/max_side), rotated, flipped, with a quality, or compressed to a target size in KB. Full quality and original size unless asked otherwise. Send the file as file (attached in the chat), url or base64. Returns download_page when done.

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": {
      "output_format": "<output_format>"
    },
    "name": "convert_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
fitNoWith width and height: stretch, or contain (fit inside with borders).
urlNoA public http(s) link to the file. Use this, file or base64.
fileNoA file attached in the chat (filled in by the app; use this instead of base64 when the user attached the file).
widthNoNew width in pixels.
base64NoThe file as base64 (or a data: URL), for small files only. Prefer file or url.
heightNoNew height in pixels.
rotateNoClockwise rotation.
qualityNo1–100 for lossy formats; default 100.
filenameNoOriginal file name, e.g. photo.heic (helps to recognise the input).
max_sideNoShrink so the longest side is at most this many pixels (never enlarges).
target_kbNoCompress to at most this size in KB (lowers quality, then size if needed).
backgroundNo#rrggbb used where transparency must be filled (e.g. PNG → JPEG).
flip_verticalNoMirror top–bottom.
output_formatYesTarget: jpeg (jpg), png, webp, gif, bmp, avif, ico or tiff.
flip_horizontalNoMirror left–right.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

B3.4/5.0
Behavior3/5

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

No annotations beyond the title, so the description carries the full behavioral burden. It usefully discloses defaults (full quality and original size) and the return value (download_page), but does not cover permissions, limits, whether conversion is synchronous, or how the download page should be used.

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?

The description is front-loaded with the purpose and then moves through transformations, defaults, input methods, and return value. It is dense but readable; the format list and parameter summary slightly overlap with schema content.

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 a 15-parameter conversion tool with no output schema, the description covers the essentials but leaves gaps around the returned download_page, output file lifetime, and when to choose this over convert_document. It is adequate but not fully complete.

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%, so the schema already documents all 15 parameters in detail. The description summarizes the main parameter groups and input methods but adds no semantics beyond what the schema provides.

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 states a specific verb and resource: convert a picture to a named set of output formats. It also names key optional transformations. It does not differentiate from the sibling convert_document, but the image-specific scope is clear.

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 implied: use this to convert an image, with input supplied as file, url, or base64. There is no explicit when-not-to-use guidance or comparison to convert_document, get_conversion, or list_formats.

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.

Resources