Skip to main content
Glama

capture_gif

Create animated GIFs from sequential captures of terminals, code, diffs, web pages, and more. Use for tutorials, before/after comparisons, and step-by-step demonstrations.

Instructions

Create an animated GIF from sequential captures. Each frame is captured with full type-specific parameters, then compiled into a GIF. Use for animated tutorials, before/after comparisons, step-by-step demonstrations. Maximum 60 frames, maximum canvas 8192x8192.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
loopNoWhether the GIF loops infinitely (true) or plays once (false)
titleNoName for the GIF (used in default filename)animation
outputNoOutput filename (default: auto-generated as '<title>-<timestamp>.gif'). Must end in .gif
capturesYesArray of frames to capture. Each frame specifies its capture type and type-specific parameters. Minimum 2, maximum 60 frames.
frameDelayNoFrame delay in milliseconds (10-5000). Default 800ms.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv2.3.4
    • addedInput schema / properties / captures / description
      Added value: +"Array of frames to capture. Each frame specifies its capture type and type-specific parameters. Minimum 2, maximum 60 frames."
    • addedInput schema / properties / captures / items / oneOf
      Added value: +[
      +  {
      +    "properties": {
      +      "lines": {
      +        "description": "Lines to render. Prefix with '$ ' for prompts.",
      +        "items": {
      +          "type": "string"
      +        },
      +        "maxItems": 1000,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "title": {
      +        "description": "Window title (default: 'frame')",
      +        "maxLength": 100,
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "terminal",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "lines",
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "code": {
      +        "description": "Source code to render",
      +        "maxLength": 200000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "endLine": {
      +        "description": "Last line number (1-indexed, inclusive)",
      +        "maximum": 9007199254740991,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "language": {
      +        "default": "text",
      +        "description": "Programming language (typescript, python, rust, go, etc.)",
      +        "type": "string"
      +      },
      +      "startLine": {
      +        "description": "First line number (1-indexed)",
      +        "maximum": 9007199254740991,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "title": {
      +        "description": "Window title (default: 'frame')",
      +        "maxLength": 100,
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "code",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "code",
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "endLine": {
      +        "description": "Last line number (1-indexed, inclusive)",
      +        "maximum": 9007199254740991,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "filePath": {
      +        "description": "Absolute path to file (must be in SNAPMCP_ALLOWED_PATHS)",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "startLine": {
      +        "description": "First line number (1-indexed)",
      +        "maximum": 9007199254740991,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "type": {
      +        "const": "file",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "filePath",
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "fullPage": {
      +        "default": false,
      +        "description": "Capture full scrollable page",
      +        "type": "boolean"
      +      },
      +      "height": {
      +        "default": 800,
      +        "description": "Viewport height (px)",
      +        "maximum": 4096,
      +        "minimum": 240,
      +        "type": "integer"
      +      },
      +      "type": {
      +        "const": "browser",
      +        "type": "string"
      +      },
      +      "url": {
      +        "description": "URL to capture (http/https, SSRF protected)",
      +        "format": "uri",
      +        "type": "string"
      +      },
      +      "width": {
      +        "default": 1280,
      +        "description": "Viewport width (px)",
      +        "maximum": 3840,
      +        "minimum": 320,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "url",
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "markdown": {
      +        "description": "Markdown content (GFM supported)",
      +        "maxLength": 200000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "title": {
      +        "description": "Document title (default: 'frame')",
      +        "maxLength": 100,
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "markdown",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "markdown",
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "html": {
      +        "description": "HTML content (external resources blocked)",
      +        "maxLength": 200000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "title": {
      +        "description": "Description for logging (default: 'frame')",
      +        "maxLength": 100,
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "html",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "html",
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "diff": {
      +        "description": "Unified diff content (git diff format)",
      +        "maxLength": 500000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "diff",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "diff",
      +      "type"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / captures / items / properties
      Removed value: -{
      -  "label": {
      -    "description": "Optional label for the capture",
      -    "type": "string"
      -  },
      -  "params": {
      -    "additionalProperties": {},
      -    "description": "Parameters for the capture type",
      -    "propertyNames": {
      -      "type": "string"
      -    },
      -    "type": "object"
      -  },
      -  "type": {
      -    "enum": [
      -      "terminal",
      -      "code",
      -      "file",
      -      "browser",
      -      "markdown",
      -      "diff",
      -      "html"
      -    ],
      -    "type": "string"
      -  }
      -}
    • removedInput schema / properties / captures / items / required
      Removed value: -[
      -  "type",
      -  "params"
      -]
    • removedInput schema / properties / captures / items / type
      Removed value: -"object"
    • changedInput schema / properties / frameDelay / description
      Previous value: -"Frame delay in ms"New value: +"Frame delay in milliseconds (10-5000). Default 800ms."
    • changedInput schema / properties / loop / description
      Previous value: -"Whether the GIF loops"New value: +"Whether the GIF loops infinitely (true) or plays once (false)"
    • changedInput schema / properties / output / description
      Previous value: -"Output filename for the GIF"New value: +"Output filename (default: auto-generated as '<title>-<timestamp>.gif'). Must end in .gif"
    • changedInput schema / properties / title / description
      Previous value: -"Name for the GIF"New value: +"Name for the GIF (used in default filename)"
    • addedInput schema / properties / title / maxLength
      Added value: +100
  2. First observedv2.3.2

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description must carry the full burden of behavioral disclosure. It mentions constraints like 'Maximum 60 frames, maximum canvas 8192x8192', which is good. However, it does not disclose other behaviors such as how output is returned (file path?), whether it is synchronous, or potential side effects (e.g., temporary files). This is a moderate gap but not contradictory.

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?

The description is concise, with the primary purpose in the first sentence and key constraints (max frames, canvas) early. Sentences are efficient and avoid redundancy. The mention of use cases adds a little length but is valuable for guidance, so it earns its place.

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?

Given the complex input schema with seven capture types, the description provides a high-level overview but omits details like the specific frame types (terminal, code, etc.) and that each has its own parameters. However, the schema itself documents these thoroughly, so the description doesn't need to repeat. It does not explain the return value, but with no output schema, a note on what to expect (e.g., a file path) would improve 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 schema already documents all parameters, including nested types. The description adds minimal value beyond the schema, but it does clarify the overall flow (frames are captured sequentially) and reinforces the min/max frames. The schema covers parameter meaning well, so this is adequate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool creates an animated GIF from sequential captures, and explains that frames are captured with full type-specific parameters. It distinguishes itself from siblings (which likely capture single frames) by focusing on animated GIF output. The use cases (animated tutorials, before/after comparisons, step-by-step demonstrations) provide clear context.

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

Usage Guidelines4/5

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

The description explains when to use this tool (for animated content) and implies that it is the right choice over single-capture siblings. However, it does not explicitly mention when NOT to use it (e.g., for a single frame, where a sibling would be more appropriate). The example use cases give good context, but explicit alternatives are not named.

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