Skip to main content
Glama

Resize, convert or keep metadata of a compressed image

tinypng_transform_image

WRITE (uses quota): apply a resize, a format conversion and/or metadata preservation to an image compressed earlier (the output_url from tinypng_compress_image, valid about 48 hours). Returns the resulting type, byte size, width, height and Compression-Count; the image itself is returned too when include_image is true and it is under 1 MB. Resize: method scale (give width OR height), or fit / cover / thumb (give width AND height); images are never scaled up. Convert: one or more of image/webp, image/jpeg, image/png, image/avif, image/jxl (several = the smallest is returned) or / (the smallest of WebP, JPEG, PNG); converting a transparent image to JPEG needs a background colour. Preserve: copyright, creation, location (location is JPEG only) keeps that metadata, which makes the file slightly larger. Each call is a fresh request: resize and convert each count one extra compression on your monthly Tinify quota, preserve is free. Tinify returns the bytes only (no new URL), so only include_image gives you the transformed file, and only when it is under 1 MB. POST /output/{id}.

Input Schema

NameRequiredDescriptionDefault
preserveNoMetadata to keep: copyright, creation, location (JPEG only).
backgroundNoBackground for transparent areas when converting to a type without transparency (JPEG): "#rrggbb", "white" or "black". Only with convert_to.
convert_toNoTarget type(s), e.g. ["image/webp"]. Several = the smallest result is returned. ["*/*"] = the smallest of WebP, JPEG, PNG.
output_urlYesThe output_url returned by tinypng_compress_image (https://api.tinify.com/output/<id>), or just the id. Outputs are kept by Tinify for about 48 hours.
resize_widthNoTarget width in pixels.
include_imageNoAlso return the resulting image (only when it is under 1 MB). Default false: sizes only.
resize_heightNoTarget height in pixels.
resize_methodNoResize method. scale: width or height; fit/cover/thumb: width and height.

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?

Beyond the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=false), the description discloses quota cost per operation (resize and convert each cost one extra compression, preserve is free), the 48-hour validity window of outputs, the 1 MB cap on returned images, and the fact that Tinify returns bytes only with no new URL. These are material operational facts an agent cannot infer from the annotations.

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 dense and front-loads the WRITE/quota warning, then proceeds method-by-method (Resize / Convert / Preserve), which is easy to scan. It is long for a tool description, and the include_image/1 MB rule is restated twice, which is a small redundancy.

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?

There is no output schema, so the description carries the return-value burden and does so fully: resulting type, byte size, width, height, Compression-Count, plus the conditional image payload. It also covers expiry, quota, and the endpoint, leaving nothing essential unstated for an 8-parameter tool.

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 already 100%, so the baseline is 3, but the description adds real semantic value: it explains the cross-parameter constraint that scale takes width OR height while fit/cover/thumb require both, that images are never scaled up, that multiple convert targets return the smallest result, and that transparent-to-JPEG conversion requires a background colour. This goes beyond the per-field schema text.

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?

Opens with a specific verb and resource ("WRITE (uses quota): apply a resize, a format conversion and/or metadata preservation to an image") and explicitly anchors the input to the sibling tool's output ("the output_url from tinypng_compress_image"). An agent can distinguish this from tinypng_compress_image without opening either 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 context for when to use it: it operates on an already-compressed image from tinypng_compress_image, within a ~48 hour window, and each call is a fresh request. It does not explicitly state when NOT to use it or point to tinypng_download_image as the alternative for fetching files, so it falls short of full routing 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.