Skip to main content
Glama

Convert or compress an image

convert_image

Re-encodes an image as jpeg, png, webp, avif at a chosen quality, to change format or shrink file size. JPEG flattens transparency to white. Without an API key: returns a free watermarked preview (≤700px) plus unlock_url, which a human opens to download the full-resolution file for site credits (then call get_result). With an API key (Authorization: Bearer stb_…): returns download_url for the full-resolution file directly and charges the key owner's credits when the job starts, refunded automatically if processing fails. Retrying a call creates and charges a new job — use get_result to fetch an earlier one.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "convert_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNojpeg
qualityNo
image_urlNoPublic https:// URL of the image. Preferred over image_base64.
image_base64NoThe image as base64 (or a data: URL), max 2 MB. Use only when no public URL is available.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Far exceeds the annotations: it discloses the JPEG transparency-flattening side effect, the two auth modes and their distinct return values, the credit-charge-and-auto-refund model, the ≤700px watermarked preview limit, and that retries create and charge a brand-new job. These are exactly the operational facts an agent cannot infer from readOnlyHint/openWorldHint.

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?

Front-loaded with the core action and format list, then auth/return behavior. Every sentence carries unique information, though the auth-mode sentence is dense and could be split for scannability.

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

Completeness5/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 carries the return-value burden itself and does so fully: it explains both the preview/unlock_url path and the download_url path, plus charging and refund semantics. Nothing needed to call and interpret this tool correctly is missing.

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 only 50%, but the description compensates by naming the format choices and the quality control, and by explaining a real parameter consequence not in the schema (choosing jpeg flattens transparency to white). It still gives no guidance on quality tradeoffs, so it is not fully compensating.

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 (re-encodes) and resource (image) plus the exact purpose (change format or shrink file size) and the supported target formats. It is unmistakably distinct from siblings like resize_for_marketplace or add_watermark, which alter the image rather than re-encode it.

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 situational routing: use get_result to fetch an earlier job, and follow unlock_url after a watermarked preview. It does not, however, compare itself against sibling tools (e.g., when to convert vs. resize) or state exclusions, so it stops short of full alternative guidance.

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