Skip to main content
Glama
ext-sakamoro

Aseprite MCP Tools

by ext-sakamoro

export_sprite

Convert Aseprite files to various image formats like PNG, GIF, or JPG with customizable scale and frame range options.

Instructions

Export the Aseprite file to another format.

Args: filename: Name of the Aseprite file to export output_filename: Name of the output file format: Output format (default: inferred from extension, can be "png", "gif", "jpg", etc.) scale: Export scale factor (default: 1.0) frame_range: Frame range to export (e.g., "1-5" or "2,4,6")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYes
output_filenameYes
formatNo
scaleNo
frame_rangeNo

Implementation Reference

  • The 'export_sprite' tool handler function that executes Aseprite export via command line arguments.
    @mcp.tool()
    async def export_sprite(
        filename: str, 
        output_filename: str, 
        format: Optional[str] = None,
        scale: float = 1.0,
        frame_range: Optional[str] = None
    ) -> str:
        """Export the Aseprite file to another format.
    
        Args:
            filename: Name of the Aseprite file to export
            output_filename: Name of the output file
            format: Output format (default: inferred from extension, can be "png", "gif", "jpg", etc.)
            scale: Export scale factor (default: 1.0)
            frame_range: Frame range to export (e.g., "1-5" or "2,4,6")
        """
        try:
            # Validate inputs
            file_path = validate_file_path(filename, must_exist=True)
            output_path = validate_file_path(output_filename, must_exist=False)
            
            # Determine format from extension if not provided
            if format is None:
                format = output_path.suffix.lstrip('.')
                if not format:
                    format = 'png'
            
            format = validate_export_format(format)
            
            # Ensure output filename has the correct extension
            if not output_path.suffix.lower() == f".{format}":
                output_path = output_path.with_suffix(f".{format}")
            
            # Validate scale
            if scale <= 0:
                raise ValidationError("scale", scale, "Scale must be positive")
            
            cmd = get_command()
            
            # Use command line for exports (more reliable than Lua for this)
            args = ["--batch", str(file_path)]
            
            # Add frame range if specified
            if frame_range:
                args.extend(["--frame-range", frame_range])
            
            # Add scale if not 1.0
            if scale != 1.0:
                args.extend(["--scale", str(scale)])
            
            # Add output
            args.extend(["--save-as", str(output_path)])
            
            success, output = cmd.run_command(args)
            
            return f"Sprite exported successfully to {output_path}"
            
        except (ValidationError, AsepriteError) as e:
            return f"Failed to export sprite: {e}"
        except Exception as e:
            return f"Unexpected error: {e}"
Behavior2/5

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

With no annotations, the description carries full burden but only states the basic export action. It doesn't disclose permissions needed, file overwriting behavior, error handling, or output specifics, leaving significant gaps for a mutation tool.

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 efficiently structured with a brief purpose statement followed by a bulleted parameter list. Every sentence earns its place, and information is front-loaded appropriately.

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?

For a mutation tool with no annotations or output schema, the description covers parameters well but lacks behavioral context like side effects or return values. It's partially complete but has notable gaps given the complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description compensates well by explaining all 5 parameters with clear semantics, defaults, and examples (e.g., format inference, frame range syntax). It adds substantial value beyond the bare schema.

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 tool exports an Aseprite file to another format with a specific verb ('Export') and resource ('Aseprite file'). It distinguishes from siblings like 'batch_export' by focusing on single-file export, though not explicitly contrasting them.

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?

No guidance on when to use this tool versus alternatives like 'batch_export' or 'export_layers' is provided. The description implies usage for single-file exports but lacks explicit context or exclusions.

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/ext-sakamoro/AsepriteMCP'

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