Skip to main content
Glama

Convert an image

convert_image
Read-onlyIdempotent

Convert an image to JPEG, PNG, WebP, or AVIF. Send base64 or a public URL. Private addresses are refused and the decoded file is capped at 10 MB. Returns the image as base64. HEIC is not decoded here.

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

Input Schema

NameRequiredDescriptionDefault
fileYesThe image. Provide url or data.
targetNojpeg

Output Schema

NameRequiredDescriptionDefault
dataYesEncoded image as base64.
mimeYes
bytesYes
widthYes
heightYes
sourceYes
filenameYes
extensionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, openWorld, and idempotent, so the safety profile is covered; the description adds real value on top with the 10 MB decoded cap, the SSRF-style refusal of private addresses, and the base64 return shape. It does not mention error behavior for refused URLs or oversized files, which is the main remaining gap.

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 short sentences, front-loaded with the operation and targets, then constraints, then output, then the exclusion. Nothing is redundant and every clause carries new information.

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?

For a tool with an output schema and full annotation coverage, the description supplies the constraints an agent needs: input source rules, size cap, unsupported format, and return type. Minor omissions like the default target being jpeg (visible in the schema) and failure modes keep it just under full marks.

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 50%, and the nested fields (url, data, filename, mimeType) are already documented in the schema itself. The description reinforces 'base64 or public URL' and lists the target formats, but adds no format syntax, encoding caveats, or default behavior beyond the enum, so it stays at baseline.

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?

States a specific verb and resource plus the exact target formats (JPEG, PNG, WebP, AVIF), which cleanly separates it from siblings like compress_image, crop_image, and resize_image. An agent can identify the operation without opening the schema.

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

Usage Guidelines4/5

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

Gives clear operative context: supply base64 or a public URL, private addresses are refused, and HEIC is explicitly out of scope. It stops short of naming a sibling alternative for the excluded cases (e.g. HEIC decoding), so routing for unsupported inputs is left implicit.

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.