Skip to main content
Glama

photo_compress_to_size

Compress Image to Size — Compress an image to hit a target file size in KB. [category: photo]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesJPG, PNG, WebP, GIF, BMP, HEIC, HEIF
strip_exifNoStrip EXIF metadata from the output.
output_formatNoWhat to save it as. Leave blank to keep the format it came in as - except HEIC and HEIF pictures, which always come back as JPG. Squeezing to a size needs a format that compresses, which is why BMP and GIF are not offered.
target_size_kbYesTarget size in KB as a positive integer, e.g. 200. Field name is 'target_size_kb' — not 'target_size'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / output_format / description
      Previous value: -"Optional output format, e.g. jpg, png, webp. HEIC/HEIF inputs default to jpg output."New value: +"What to save it as. Leave blank to keep the format it came in as - except HEIC and HEIF pictures, which always come back as JPG. Squeezing to a size needs a format that compresses, which is why BMP and GIF are not offered."
    • addedInput schema / properties / output_format / enum
      Added value: +[
      +  "jpg",
      +  "png",
      +  "webp"
      +]
    • addedInput schema / properties / target_size_kb / default
      Added value: +500
    • changedInput schema / properties / target_size_kb / maximum
      Previous value: -524288New value: +25600
  2. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the safety profile is covered. The description adds only the target-size behavior; it does not disclose whether the original is overwritten, what the output artifact is, or any auth/rate-limit constraints. With annotations present, this adds modest context but not rich behavioral detail.

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?

One front-loaded sentence plus a category tag; no redundancy or filler. Every word contributes to identifying the operation and its target outcome.

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 simple image transformation with complete parameter documentation and annotations covering safety, the description gives enough for correct invocation. However, with no output schema, it stops short of describing what the tool returns, leaving a minor gap.

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 100%, and the schema itself documents file formats, strip_exif, output_format, and target_size_kb thoroughly, including a helpful note about the exact field name. The description adds no parameter syntax or format detail beyond what is already structured.

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 'Compress' and resource 'Image', plus the measurable outcome 'hit a target file size in KB'. This distinguishes it from a generic photo_compress, but it does not name the sibling or clarify scope boundaries explicitly.

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 target-size outcome implies the scenario (use when a specific KB limit is required), but there is no explicit when-to-use, when-not-to-use, or reference to alternatives like photo_compress, photo_resize, or media_compress_video. Usage is only inferable from the purpose statement.

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