Skip to main content
Glama

export_sprite_sheet

Export pixel art animations as a sprite sheet PNG to organize multiple frames into a single image file for game development or animation workflows.

Instructions

Export all frames as a sprite sheet PNG

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject identifier
outputPathYesOutput file path
columnsNoNumber of columns in the sprite sheet (optional)

Implementation Reference

  • The internal handler method that calls the export logic and writes the file.
    private exportSpriteSheet(
      projectId: string,
      outputPath: string,
      columns?: number
    ): object {
      const piskel = this.getProject(projectId);
      const pngData = exportSpriteSheetAsPNG(piskel, columns);
    
      const dir = path.dirname(outputPath);
      if (!fs.existsSync(dir)) {
        fs.mkdirSync(dir, { recursive: true });
      }
    
      fs.writeFileSync(outputPath, pngData);
    
      return {
        success: true,
        outputPath,
  • The core logic function that generates the PNG binary data for the sprite sheet.
    export function exportSpriteSheetAsPNG(
      piskel: Piskel,
      columns?: number
    ): Uint8Array {
      const sheet = createSpriteSheet(piskel, columns);
      return encodePNG(sheet.width, sheet.height, sheet.data);
    }
  • The definition and registration of the 'export_sprite_sheet' tool in the PiskelServer.
    {
      name: 'export_sprite_sheet',
      description: 'Export all frames as a sprite sheet PNG',
      inputSchema: {
        type: 'object',
        properties: {
          projectId: {
            type: 'string',
            description: 'Project identifier',
          },
          outputPath: {
            type: 'string',
            description: 'Output file path',
          },
          columns: {
            type: 'number',
            description: 'Number of columns in the sprite sheet (optional)',
          },
        },
        required: ['projectId', 'outputPath'],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions exporting frames as a PNG, implying a write operation, but lacks details on permissions, file overwriting behavior, error handling, or output format specifics. This is insufficient for a mutation tool with zero annotation coverage.

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?

The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It is front-loaded and wastes no space, making it easy to parse quickly.

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?

Given the complexity of a file export operation with no annotations and no output schema, the description is incomplete. It does not address critical aspects like what happens if the output path exists, error conditions, or the structure of the sprite sheet. More detail is needed for adequate contextual understanding.

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. The description does not add any additional meaning or context beyond what the schema provides, such as explaining how 'columns' affects layout or default values. Baseline 3 is appropriate when the schema handles parameter documentation.

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 clearly states the action ('Export') and the resource ('all frames as a sprite sheet PNG'), making the purpose immediately understandable. However, it does not explicitly differentiate from sibling tools like 'export_gif' or 'export_png', which would be needed for a score of 5.

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 description provides no guidance on when to use this tool versus alternatives like 'export_gif' or 'export_png', nor does it mention any prerequisites or context for usage. It merely states what the tool does without indicating appropriate scenarios.

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

Install Server

Other Tools

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