Skip to main content
Glama

export_gif

Export pixel art animations as GIF files with configurable frame delays for sharing or use in projects.

Instructions

Export as animated GIF

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject identifier
outputPathYesOutput file path
frameDelayNoDelay between frames in milliseconds (default: 100)

Implementation Reference

  • The handler function that executes the export_gif tool logic.
    private exportGIF(
      projectId: string,
      outputPath: string,
      frameDelay: number
    ): object {
      const piskel = this.getProject(projectId);
      const gifData = exportAsGIF(piskel, frameDelay);
    
      const dir = path.dirname(outputPath);
      if (!fs.existsSync(dir)) {
        fs.mkdirSync(dir, { recursive: true });
      }
    
      fs.writeFileSync(outputPath, gifData);
    
      return {
        success: true,
        outputPath,
        size: gifData.length,
        frameCount: piskel.getFrameCount(),
        frameDelay,
      };
    }
  • The tool registration definition for export_gif.
    name: 'export_gif',
    description: 'Export as animated GIF',
    inputSchema: {
      type: 'object',
      properties: {
        projectId: {
          type: 'string',
          description: 'Project identifier',
        },
        outputPath: {
          type: 'string',
          description: 'Output file path',
        },
        frameDelay: {
          type: 'number',

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yafeiaa/piskel-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server