Skip to main content
Glama

image_compress

Read-onlyIdempotent

Make an image file smaller from freedailypro: same format unless format is given (png, jpeg, webp, avif, gif, tiff), quality 1-100 for JPEG/WebP/AVIF (default 80), PNG stays lossless unless quality is below 100 (then a smaller 256-colour palette), metadata removed unless stripMetadata is false, optional maxWidth/maxHeight (never enlarges). If the file cannot be made smaller in its own format the original bytes come back unchanged and the note says so

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": {
      "fileBase64": "<fileBase64>"
    },
    "name": "image_compress"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNopng, jpeg (or jpg), webp, avif, gif, tiff, bmp or ico; image/... types also work. Default: the same format as the input
qualityNo0-1 (for example 0.8) or 1-100 (for example 80); JPEG, WebP, AVIF, and palette PNG
losslessNoWebP/AVIF lossless
maxWidthNo
maxHeightNo
fileBase64Yes
stripMetadataNoRemove EXIF/GPS/colour-profile data. Default true
backgroundColorNoFill for transparent areas (always used for JPEG), e.g. '#ffffff' or 'white'

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description still adds real value: format preservation, default quality 80, automatic metadata stripping, no-upscaling, and the graceful fallback where unshrinkable files return original bytes with an explanatory note. It omits size/rate constraints on the base64 payload, 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Information-dense and front-loaded with the core action, then defaults, then the edge-case fallback. It is a single run-on sentence, though, which costs a little scannability.

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 an 8-parameter tool with no output schema, the description covers the main behaviour well but leaves the response shape vague ('the note says so') and does not account for the lossless and backgroundColor parameters that materially change output.

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?

With 63% schema coverage the schema already documents most parameters, and the description adds useful semantics for format, quality (including the PNG palette threshold), stripMetadata, and maxWidth/maxHeight. However it never mentions the 'lossless' flag for WebP/AVIF or 'backgroundColor' (required for JPEG transparency), leaving two parameters to the schema alone.

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?

States a specific verb+resource ('Make an image file smaller') and immediately scopes the behaviour, which separates it from image_convert/image_resize without naming them. Sibling differentiation is implicit rather than explicit, so it stops short of a 5.

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?

The description implies the use case (shrinking a file) but never states when to pick this over image_convert, image_resize, or image_crop, nor any prerequisites such as input size limits. An agent must infer the selection rule from the tool name alone.

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