Skip to main content
Glama

Compress Image

compress_image
Idempotent

Reduce image file size by applying adjustable compression and optional width/height caps, with output format and quality control.

Instructions

Compress an image to reduce file size, optionally capping dimensions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput format (jpeg, png, webp, ...). Defaults to source format.
qualityNoCompression quality 1-100.
max_widthNoOptionally cap the width in pixels.
max_heightNoOptionally cap the height in pixels.
source_urlNoPublic URL of the image.
file_base64NoBase64-encoded image.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6

TDQS

B3.2/5.0
Behavior3/5

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

Annotations only provide 'openWorldHint' and 'idempotentHint', which already convey some behavioral context. The description adds the fact that the tool reduces file size and may cap dimensions, but it does not disclose important behavioral details like whether the operation is lossy, what happens if neither input parameter is provided, or whether the original image is modified. It does not contradict 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.

Conciseness5/5

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

The description is a single, front-loaded sentence that states the primary purpose and the key optional behavior without any filler. It is appropriately sized for a tool whose parameter details are already covered by the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Although the output schema exists and parameter descriptions are complete, the description fails to cover essential selection and invocation context. An agent cannot tell from the description that at least one image source must be provided, nor can it distinguish this tool from 'resize_image'. These gaps are significant for a six-parameter tool with zero required parameters and minimal annotations.

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 six parameters and their meaning. The description adds a general hint about capping dimensions, which maps to 'max_width' and 'max_height', but it does not provide any additional semantic clarity beyond the schema, especially around the mutually exclusive 'source_url' and 'file_base64' inputs.

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 clearly states the action ('Compress an image') and the intended outcome ('reduce file size, optionally capping dimensions'). It is specific about verb and resource, but it does not explicitly differentiate itself from the sibling tool 'resize_image', which also deals with image dimensions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'resize_image' or 'convert_file'. It does not mention preconditions, such as needing to supply either 'source_url' or 'file_base64', nor does it state when compression is preferable to resizing or format conversion.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.