Skip to main content
Glama

Benchline

Compress an image

compress_image
Read-onlyIdempotent

Re-encode an image at a quality from 1 to 100, optionally capping the longest edge. Send base64 or a public URL. Private addresses are refused and the decoded file is capped at 10 MB. Returns the image as base64.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesThe image. Provide url or data.
choiceNooriginal
maxEdgeNoLongest edge in pixels. Omit it to keep the size.
qualityNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesCompressed image as base64.
mimeYes
afterYes
bytesYes
labelYes
widthYes
beforeYes
formatYes
heightYes
qualityYes
filenameYes
extensionYes
savedBytesYes
savedPercentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so safety is partly covered. The description adds genuinely useful behavior beyond them: private/local addresses are refused (SSRF guard), decoded input is capped at 10 MB, and the result is returned as base64. It does not mention rate limits or what happens to non-image input, but the additions are substantive.

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?

Four short sentences, each carrying distinct information (operation, inputs, limits, return). Constraints and inputs are front-loaded with no filler.

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?

With an output schema present, return values need not be described, yet the description still notes the base64 return. Inputs and size/SSRF limits are covered, so an agent can call it correctly; the only gap is the unexplained output-format enum.

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 coverage is only 50%, and the description compensates for the undocumented 'quality' parameter by stating the 1-100 range (the schema gives it no description). However, the 'choice' enum (original/jpeg/png/webp/avif) is never explained, leaving the output-format parameter uninterpreted in both places. A 3 reflects partial compensation.

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 and resource (re-encode/compress an image) plus scope details: quality range and optional longest-edge capping. It separates itself somewhat from resize_image and convert_image by emphasizing re-encoding at a quality level, but never names or contrasts those siblings 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?

Gives input guidance ('Send base64 or a public URL') and constraints, but never says when to reach for this over resize_image, convert_image, or optimize_svg. Usage is implied by the tool's function rather than routed against alternatives.

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