Skip to main content
Glama

Export GIF or WebP

export_gif
Destructive

Export an animated GIF or WebP within a size budget for PRs, issues, or READMEs, automatically lowering fps, width, and quality until the file fits.

Instructions

Export an animated GIF or WebP that fits a size budget (for PRs, issues, READMEs), stepping fps, width, and quality down until it fits.

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

Input Schema

NameRequiredDescriptionDefault
fpsNoStarting frame rate (default 12).
inputYesPath to the source video.
startNoStart second.
widthNoStarting width in px (default 960).
formatNogif (default) or webp (usually much smaller).
outputNoOptional output path. Defaults under SCREENCAST_HOME/edits.
durationNoSeconds to export (default: to the end).
maxBytesNoSize budget in bytes (default 10000000, under GitHub's 10 MB image limit).
overwriteNoAllow replacing an existing file at the output path (default false).

Output Schema

NameRequiredDescriptionDefault
outputPathYesPath of the file written.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.47.0
    • changedInput schema / properties / duration / description
      Previous value: -"Export only this many seconds (default: to the end)."New value: +"Seconds to export (default: to the end)."
    • changedInput schema / properties / format / description
      Previous value: -"gif (plays everywhere, default) or webp (animated WebP, usually much smaller)."New value: +"gif (default) or webp (usually much smaller)."
    • changedInput schema / properties / maxBytes / description
      Previous value: -"File-size budget in bytes (default 10000000, under GitHub's 10 MB limit for images). Quality steps down until the file fits."New value: +"Size budget in bytes (default 10000000, under GitHub's 10 MB image limit)."
    • changedInput schema / properties / start / description
      Previous value: -"Start at this many seconds into the video."New value: +"Start second."
    • changedInput schema / properties / width / description
      Previous value: -"Starting width in px (default 960); height follows the aspect ratio."New value: +"Starting width in px (default 960)."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "outputPath": {
      +      "description": "Path of the file written.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "outputPath"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.32.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations declare destructiveHint=true and non-idempotent, so the write/safety profile is already covered. The description adds the important behavioral fact that the tool iteratively steps fps, width, and quality down until the budget is met, which is not inferable from annotations or schema. It doesn't mention overwrite semantics, but the schema spells those out.

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?

One sentence, front-loaded with the action and its purpose, then the adaptive mechanism. No wasted words.

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, the description doesn't need to explain return values, and full schema coverage handles parameters. What it must convey — the self-tightening export behavior — it does, though it could note the default format or the overwrite implication for full completeness.

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 baseline is 3. The description's phrasing frames fps/width as starting points that get reduced, which reinforces but does not meaningfully exceed the schema's own 'Starting frame rate'/'Starting width' wording.

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 (export GIF/WebP) plus the defining mechanism: it degrades fps/width/quality until it fits a size budget. That mechanism is what separates it from siblings like convert, compress, and export_preset. It does not explicitly name those siblings, so it falls just short of a 5.

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?

It gives clear usage context ('for PRs, issues, READMEs'), which implies when to reach for it. However, it offers no exclusions and doesn't route the agent away from convert, compress, or export_preset when those might be the better fit.

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