Skip to main content
Glama

Compress GIF

compress_gif

Compress local GIF files with Gifsicle using presets, custom settings, or a target size, keeping inputs on-device and never overwriting them.

Instructions

Compress a local GIF privately with Gifsicle. Supports presets, custom settings, and a target size.

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>"
    },
    "name": "compress_gif"
  }
}

Input Schema

NameRequiredDescriptionDefault
lossyNoGifsicle lossy level from 0 to 200.
scaleNoImage scale from 0.1 to 1.
colorsNoPalette size from 2 to 256 colors.
presetNoCompression preset.balanced
optimizeNoGifsicle optimization level from 1 to 3.
overwriteNoAllow replacing an existing output file. The input is never overwritten.
target_mbNoOptional target size in MB. The server progressively strengthens compression.
input_pathYesAbsolute or working-directory-relative path to a GIF file.
output_pathNoOptional output GIF path. Defaults to <name>-compressed.gif beside the input.

Output Schema

NameRequiredDescriptionDefault
widthYes
heightYes
size_mbYes
animatedYes
settingsYes
target_mbYes
input_pathYes
size_bytesYes
frame_countYes
output_pathYes
saved_bytesYes
saved_percentYes
original_bytesYes
target_reachedYes
compressed_bytesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full disclosure burden. It adds only the word 'privately', which usefully signals local/off-device processing, but says nothing about whether the input file is modified, what happens on path collisions, or that target_mb triggers progressive recompression passes.

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?

Two tight sentences with the core action front-loaded and no filler. It is concise to the point of thinness for a nine-parameter tool, but no sentence is wasted.

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

Completeness3/5

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

An output schema exists, so return values need not be explained, and the schema fully documents parameters. What is missing is interaction guidance for a relatively complex tool: whether explicit settings override the preset, and how target_mb interacts with lossy/colors.

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 every one of the nine parameters is already documented, including ranges and the target_mb progressive-strengthening behavior. The description's mention of 'presets, custom settings, and a target size' merely points at categories already covered, adding no precedence rules.

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 ('Compress a local GIF') plus the underlying engine (Gifsicle), and the word 'local' implies a single-file operation rather than a batch. It stops short of naming batch_compress_gifs or inspect_gif as the alternatives, so differentiation is left to inference.

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 second sentence ('Supports presets, custom settings, and a target size') lists capabilities, not usage conditions. There is no statement of when to pick this over batch_compress_gifs for multiple files, nor when to inspect_gif first, and no note on combining presets with explicit parameters.

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

Deploy Server

Other Tools