Skip to main content
Glama
ext-sakamoro

Aseprite MCP Tools

by ext-sakamoro

create_canvas

Create a new Aseprite canvas by specifying width and height in pixels to start pixel art projects with custom dimensions.

Instructions

Create a new Aseprite canvas with specified dimensions.

Args: width: Width of the canvas in pixels height: Height of the canvas in pixels filename: Name of the output file (default: canvas.aseprite)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthYes
heightYes
filenameNocanvas.aseprite

Implementation Reference

  • The create_canvas tool is registered with the @mcp.tool() decorator and implemented as an async function that validates dimensions, constructs a Lua script using LuaBuilder, and executes it via the command interface.
    @mcp.tool()
    async def create_canvas(width: int, height: int, filename: str = "canvas.aseprite") -> str:
        """Create a new Aseprite canvas with specified dimensions.
    
        Args:
            width: Width of the canvas in pixels
            height: Height of the canvas in pixels
            filename: Name of the output file (default: canvas.aseprite)
        """
        try:
            log_operation("create_canvas", filename, width=width, height=height)
            
            # Validate inputs
            width, height = validate_dimensions(width, height)
            file_path = validate_file_path(filename, must_exist=False)
            
            # Build Lua script
            builder = LuaBuilder()
            builder.create_sprite(width, height)
            builder.save_sprite(str(file_path))
            
            # Execute script
            cmd = get_command()
            success, output = cmd.execute_lua_script(builder.build())
            
            logger.info(f"Canvas created successfully", file=str(file_path), dimensions=f"{width}x{height}")
            return f"Canvas created successfully: {file_path}"
            
        except (ValidationError, AsepriteError) as e:
            log_error(f"Failed to create canvas", e, "create_canvas", filename=filename)
            return f"Failed to create canvas: {e}"
        except Exception as e:
            log_error(f"Unexpected error in create_canvas", e, "create_canvas", filename=filename)
            return f"Unexpected error: {e}"
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool creates a canvas and outputs a file, but doesn't disclose critical behavioral traits: whether this overwrites existing files, requires specific permissions, has rate limits, or what happens on failure (e.g., invalid dimensions). For a creation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 appropriately sized and front-loaded with the core purpose in the first sentence. The parameter explanations are clear and necessary given the lack of schema descriptions. There's minimal waste, though the structure could be slightly improved by integrating parameter details more seamlessly rather than a separate 'Args:' section.

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 tool's moderate complexity (3 parameters, no output schema, no annotations), the description is partially complete. It covers the basic purpose and parameters but lacks behavioral details and usage context. For a creation tool that likely involves file system operations, more information on side effects and error handling would be beneficial to fully understand its use.

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?

The description adds meaningful context beyond the input schema, which has 0% schema description coverage. It explains that width and height are in pixels and that filename is the output file name with a default. This compensates well for the lack of schema descriptions, though it doesn't detail constraints like valid pixel ranges or filename formats.

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 the specific action ('Create a new Aseprite canvas') and resource ('with specified dimensions'), distinguishing it from sibling tools like 'add_frame', 'add_layer', or 'draw_rectangle' which modify existing canvases or perform different operations. The verb 'create' is precise and unambiguous.

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 is provided on when to use this tool versus alternatives. While it's clear this creates a canvas, there's no mention of prerequisites (e.g., whether Aseprite must be running), typical use cases, or how it relates to sibling tools like 'create_palette' or 'batch_process_custom'. The description assumes the user knows when creation is needed.

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