Skip to main content
Glama

image_compress

Batch compress images by adjusting quality from 1 to 100 to reduce file size before sharing or storing, with outputs written to a target directory.

Instructions

批量按质量压缩(quality 1-100,越小文件越小,常用 60-85)。

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

Input Schema

NameRequiredDescriptionDefault
qualityNo
input_pathYes
output_dirYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it discloses almost nothing: not whether files in output_dir are overwritten, whether metadata is preserved, how output files are named, or what happens on unsupported formats. It does convey the core quality/file-size trade-off, which is the one real behavioral fact given.

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?

A single front-loaded clause with the quality guidance parenthesized; there is no wasted wording. It is terse to the point of under-specification rather than verbose.

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?

For a file-writing tool with no annotations, no output schema, and zero parameter documentation in the schema, the description is too thin. It leaves unresolved the batch input semantics, output naming, and overwrite behavior that an agent needs before invoking it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must explain all three parameters; it only explains quality well (range 1-100, smaller means smaller file, typical 60-85). It never clarifies whether input_path is a single file, a directory, or a glob pattern for the 'batch' mode, nor what output_dir receives.

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 gives a specific verb and scope – batch compression driven by a quality setting – which identifies the operation clearly. It does not distinguish itself from siblings like image_convert or image_resize, which may also reduce file size, so an agent must infer the boundary from the name alone.

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 text says nothing about when to prefer this tool over image_convert, image_resize, or image_strip, nor any prerequisite or exclusion. The only guidance present ('常用 60-85') concerns parameter values rather than tool selection.

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