Skip to main content
Glama

image-resize-convert-compress-watermark

Compress an image

image_compress

Call this tool to re-encode an image smaller and report byte counts before/after. quality (default 80) applies to JPEG; for PNG only max_width shrinks it, and the answer names which one worked. Free: sources up to 4 MP.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesName of an image uploaded with image_upload, or one this server wrote earlier
qualityNoJPEG quality 1-100, default 80
out_pathYesName for the file to write; it comes back as a download link valid for one hour. The extension decides the output format; without a known one the input's format is kept
max_bytesNoLargest the output may be, in bytes. The server searches JPEG quality down from `quality` until it fits and reports the quality it used. JPEG output only
max_widthNoScale down so the width is at most this, keeping the aspect ratio. Never scales up
overwriteNoReplace out_path if it already exists. Default false. Never allows an output to be one of the inputs

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only say the operation is not read-only and not destructive; the description adds that the response reports byte counts, that quality affects only JPEG, that PNG shrinks only via max_width, and that the answer names which method worked. It also states a free-tier source-size limit. Without an output schema, this return-signaling information is useful.

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?

Two sentences carry purpose, format-specific behavior, and a usage limit with no filler. The main goal is front-loaded and every clause earns its place.

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?

Given six parameters and no output schema, the description plus the 100%-covered schema give an agent enough to invoke the tool correctly and know what to expect back. It could be slightly stronger by naming sibling alternatives, but the free-tier limit and return behavior fill the important gaps.

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 100%, but the description goes further by linking parameters to formats: `quality` is JPEG-only, `max_width` is the PNG compression path, and the response identifies which parameter was used. This cross-parameter behavior is not present in the JSON Schema.

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?

The description specifies a concrete action ('re-encode an image smaller') and a measurable outcome ('report byte counts before/after'), which clearly separates this from sibling resize/convert tools. The PNG/JPEG behavior also ties the purpose to file-size reduction rather than dimension changes.

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?

It opens with 'Call this tool to re-encode an image smaller,' telling an agent when to reach for it. It does not name alternative tools or state when not to use it, but the format-specific caveats (JPEG vs PNG) provide clear operational context.

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.