Skip to main content
Glama

photo_compress

Compress Image — Reduce image file size using lossy or lossless compression. Supports JPEG quality setting and target-size mode. [category: photo]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesJPG, PNG, WebP, GIF, BMP, HEIC/HEIF. HEIC/HEIF input always comes back as JPG unless output_format overrides.
qualityNo1-100 (400 outside). PNG→PNG maps it to lossless compression effort — pixels unchanged; other formats re-encode lossily.
strip_exifNoStrip EXIF metadata from the output. Pass false to preserve it.
output_formatNoOptional output format; omit to keep the input format. HEIC input converts to JPG unless overridden.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / output_format / x-ui / unset_label
      Previous value: -"Keeps input format"New value: +"Keeps input format (HEIC becomes JPG)"
  2. Changed1 schema field changed
    • addedInput schema / properties / output_format / x-ui
      Added value: +{
      +  "unset_label": "Keeps input format"
      +}
  3. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations provide readOnlyHint=false and destructiveHint=false, but the description adds meaningful behavioral context: it explains that HEIC/HEIF input always returns JPG unless output_format overrides, that PNG→PNG maps quality to lossless compression effort with pixels unchanged, and that other formats re-encode lossily. It also discloses the strip_exif default behavior. This goes beyond the annotations and helps the agent understand side effects and format conversion behavior.

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 a single concise sentence followed by a category tag. It front-loads the core purpose and includes key differentiators (lossy/lossless, JPEG quality, target-size mode). It could be slightly more structured, but it is efficient and free of fluff.

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 tool with 4 parameters, 100% schema coverage, and no output schema, the description covers the essential behavioral nuances: format conversion, quality semantics, and metadata stripping. It doesn't explain return values, but the absence of an output schema and the presence of rich parameter descriptions make this acceptable. The description is complete enough for an agent to invoke the tool correctly.

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%, so the schema already documents all four parameters. The description adds a high-level summary of quality modes and target-size mode, but it doesn't add significant detail beyond the schema. The schema already explains quality mapping, output_format behavior, and strip_exif. Baseline 3 is appropriate.

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?

The description states a specific verb and resource ('Compress Image — Reduce image file size') and distinguishes it from siblings like photo_compress_to_size by mentioning both lossy/lossless compression and target-size mode. It doesn't explicitly name sibling alternatives, but the category tag and the mention of target-size mode help differentiate it from photo_resize and photo_compress_to_size.

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 usage context (compressing images to reduce file size) and mentions supported formats and modes, but it does not explicitly state when to use this tool versus alternatives like photo_compress_to_size or photo_resize. The sibling list includes photo_compress_to_size, which is a close alternative, but the description doesn't provide explicit 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.

Resources