tools

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package tools implements MCP tool handlers for Aseprite sprite manipulation.

This package provides the bridge between MCP (Model Context Protocol) tool requests and Aseprite operations. Tools are organized by category:

  • Canvas tools (canvas.go): Sprite/layer/frame creation and management
  • Drawing tools (drawing.go): Pixel, line, shape rendering with palette support
  • Animation tools (animation.go): Frame timing, tags, and linked cels
  • Inspection tools (inspection.go): Reading pixel data and sprite metadata
  • Analysis tools (analysis.go): Reference image palette extraction and edge detection
  • Dithering tools (dithering.go): 15 dithering patterns for gradients and textures
  • Palette tools (palette_tools.go): Palette management and color harmony analysis
  • Transform tools (transform.go): Image downsampling for pixel art conversion
  • Export tools (export.go): Sprite export to PNG, GIF, and other formats
  • Selection tools (selection.go): Selection mask creation and manipulation
  • Antialiasing tools (antialiasing.go): Edge detection and smoothing suggestions

All tools follow a common pattern:

  1. Input struct defines tool parameters with JSON schema annotations
  2. Output struct defines tool results
  3. Register function creates MCP tool descriptor with schema
  4. Handler function executes the Aseprite operation via Client

Tools use Aseprite's Lua API through generated scripts for all operations. No GUI automation or screen scraping is used.

Package tools implements MCP tool handlers for Aseprite sprite manipulation.

This file contains shared utilities used across all tool categories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAnalysisTools

func RegisterAnalysisTools(server *mcp.Server, client *aseprite.Client, gen *aseprite.LuaGenerator, cfg *config.Config, logger core.Logger)

RegisterAnalysisTools registers all image analysis tools with the MCP server.

func RegisterAnimationTools

func RegisterAnimationTools(server *mcp.Server, client *aseprite.Client, gen *aseprite.LuaGenerator, cfg *config.Config, logger core.Logger)

RegisterAnimationTools registers all animation tools with the MCP server.

func RegisterAntialiasingTools

func RegisterAntialiasingTools(server *mcp.Server, client *aseprite.Client, gen *aseprite.LuaGenerator, cfg *config.Config, logger core.Logger)

RegisterAntialiasingTools registers all antialiasing tools with the MCP server.

func RegisterAutoShadingTools added in v0.4.0

func RegisterAutoShadingTools(server *mcp.Server, client *aseprite.Client, gen *aseprite.LuaGenerator, cfg *config.Config, logger core.Logger)

RegisterAutoShadingTools registers the apply_auto_shading tool with the MCP server.

func RegisterCanvasTools

func RegisterCanvasTools(server *mcp.Server, client *aseprite.Client, gen *aseprite.LuaGenerator, cfg *config.Config, logger core.Logger)

RegisterCanvasTools registers all canvas management tools with the MCP server.

Registers the following tools:

  • create_canvas: Create new sprites with specified dimensions and color mode
  • add_layer: Add layers to existing sprites
  • add_frame: Add animation frames with duration control
  • get_sprite_info: Retrieve sprite metadata and structure

All tools operate on sprite files saved to disk. Canvas creation generates a new .aseprite file in the configured temp directory.

func RegisterDitheringTools

func RegisterDitheringTools(server *mcp.Server, client *aseprite.Client, gen *aseprite.LuaGenerator, cfg *config.Config, logger core.Logger)

RegisterDitheringTools registers all dithering tools with the MCP server.

func RegisterDrawingTools

func RegisterDrawingTools(server *mcp.Server, client *aseprite.Client, gen *aseprite.LuaGenerator, cfg *config.Config, logger core.Logger)

RegisterDrawingTools registers all drawing tools with the MCP server.

Registers the following drawing primitives:

  • draw_pixels: Draw individual pixels (bulk operations)
  • draw_line: Draw straight lines with thickness control
  • draw_contour: Draw multi-segment polylines (open or closed)
  • draw_rectangle: Draw rectangles (filled or outline)
  • draw_ellipse: Draw ellipses and circles (filled or outline)
  • fill: Flood fill with color replacement

All drawing tools support palette-aware color snapping via the UsePalette flag, which snaps arbitrary colors to the nearest palette color using LAB color space.

func RegisterExportTools

func RegisterExportTools(server *mcp.Server, client *aseprite.Client, gen *aseprite.LuaGenerator, cfg *config.Config, logger core.Logger)

RegisterExportTools registers all export and import tools with the MCP server.

Registers the following tools:

  • export_sprite: Export individual frames to PNG, GIF, JPG, or BMP
  • export_spritesheet: Export all frames as a spritesheet (horizontal/vertical/grid layout)
  • import_image: Import images as new layers or cels
  • save_as: Save sprite to a different path

Export tools support multiple output formats and frame selection. Import tools can create new layers or merge into existing ones.

func RegisterInspectionTools

func RegisterInspectionTools(server *mcp.Server, client *aseprite.Client, gen *aseprite.LuaGenerator, cfg *config.Config, logger core.Logger)

RegisterInspectionTools registers all inspection tools with the MCP server.

Registers the following tools:

  • get_pixels: Read pixel data from rectangular regions with pagination support

Inspection tools are read-only and do not modify sprite files.

func RegisterPaletteTools

func RegisterPaletteTools(server *mcp.Server, client *aseprite.Client, gen *aseprite.LuaGenerator, cfg *config.Config, logger core.Logger)

RegisterPaletteTools registers all palette management tools with the MCP server.

func RegisterQuantizationTools added in v0.4.0

func RegisterQuantizationTools(server *mcp.Server, client *aseprite.Client, gen *aseprite.LuaGenerator, cfg *config.Config, logger core.Logger)

RegisterQuantizationTools registers the quantize_palette tool with the MCP server.

func RegisterSelectionTools

func RegisterSelectionTools(server *mcp.Server, client *aseprite.Client, gen *aseprite.LuaGenerator, cfg *config.Config, logger core.Logger)

RegisterSelectionTools registers all selection-related MCP tools with the server.

func RegisterTransformTools

func RegisterTransformTools(server *mcp.Server, client *aseprite.Client, gen *aseprite.LuaGenerator, cfg *config.Config, logger core.Logger)

RegisterTransformTools registers all image transformation tools with the MCP server.

Types

type AddFrameInput

type AddFrameInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`         // Path to the sprite file to modify
	DurationMs int    `json:"duration_ms" jsonschema:"Frame duration in milliseconds (1-65535)"` // Frame duration in milliseconds (1-65535)
}

AddFrameInput defines the input parameters for the add_frame tool.

Adds a new animation frame to the sprite with the specified duration.

type AddFrameOutput

type AddFrameOutput struct {
	FrameNumber int `json:"frame_number" jsonschema:"Index of the created frame (1-based)"` // 1-based index of the created frame
}

AddFrameOutput defines the output for the add_frame tool.

Returns the 1-based index of the newly created frame.

type AddLayerInput

type AddLayerInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"` // Path to the sprite file to modify
	LayerName  string `json:"layer_name" jsonschema:"Name for the new layer"`            // Name for the new layer
}

AddLayerInput defines the input parameters for the add_layer tool.

Adds a new layer to an existing sprite. The layer is created above all existing layers.

type AddLayerOutput

type AddLayerOutput struct {
	Success bool `json:"success" jsonschema:"Whether the layer was added successfully"` // True if the layer was added successfully
}

AddLayerOutput defines the output for the add_layer tool.

Indicates whether the layer was successfully added.

type AddPaletteColorInput

type AddPaletteColorInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	Color      string `json:"color" jsonschema:"Hex color to add (#RRGGBB format)"`
}

AddPaletteColorInput defines the input parameters for the add_palette_color tool.

type AddPaletteColorOutput

type AddPaletteColorOutput struct {
	ColorIndex int `json:"color_index" jsonschema:"Index of the newly added color"`
}

AddPaletteColorOutput defines the output for the add_palette_color tool.

type AnalogousSet

type AnalogousSet struct {
	Colors      []string `json:"colors"`
	Harmony     float64  `json:"harmony"`
	Description string   `json:"description"`
}

AnalogousSet represents adjacent colors on the color wheel.

type AnalysisMetadata

type AnalysisMetadata struct {
	SourceDimensions Dimensions `json:"source_dimensions"`
	TargetDimensions Dimensions `json:"target_dimensions"`
	ScaleFactor      float64    `json:"scale_factor"`
	DominantHue      float64    `json:"dominant_hue"`   // 0-360 degrees
	ColorHarmony     string     `json:"color_harmony"`  // "complementary", "analogous", etc.
	ContrastRatio    string     `json:"contrast_ratio"` // "low", "medium", "high"
}

AnalysisMetadata contains metadata about the analysis.

type AnalyzePaletteHarmoniesInput

type AnalyzePaletteHarmoniesInput struct {
	Palette []string `json:"palette" jsonschema:"Array of hex colors to analyze (#RRGGBB format)"`
}

AnalyzePaletteHarmoniesInput defines the input parameters for the analyze_palette_harmonies tool.

type AnalyzeReferenceInput

type AnalyzeReferenceInput struct {
	ReferencePath    string `json:"reference_path" jsonschema:"Path to reference image (.jpg, .png, .gif, .bmp, .aseprite)"`
	TargetWidth      int    `json:"target_width" jsonschema:"Pixel art target width (1-65535)"`
	TargetHeight     int    `json:"target_height" jsonschema:"Pixel art target height (1-65535)"`
	PaletteSize      int    `json:"palette_size,omitempty" jsonschema:"Number of colors to extract (5-32, default: 16)"`
	BrightnessLevels int    `json:"brightness_levels,omitempty" jsonschema:"Quantize brightness into N levels (2-10, default: 5)"`
	EdgeThreshold    int    `json:"edge_threshold,omitempty" jsonschema:"Edge detection sensitivity (0-255, default: 30)"`
}

AnalyzeReferenceInput defines the input parameters for the analyze_reference tool.

type AnalyzeReferenceOutput

type AnalyzeReferenceOutput struct {
	Palette        []aseprite.PaletteColor `json:"palette"`
	BrightnessMap  *aseprite.BrightnessMap `json:"brightness_map"`
	EdgeMap        *aseprite.EdgeMap       `json:"edge_map"`
	Composition    *aseprite.Composition   `json:"composition"`
	DitheringZones []DitheringZone         `json:"dithering_zones"`
	Metadata       *AnalysisMetadata       `json:"metadata"`
}

AnalyzeReferenceOutput defines the output for the analyze_reference tool.

type AntialiasingResult

type AntialiasingResult struct {
	Suggestions []EdgeSuggestion `json:"suggestions"`
	Applied     bool             `json:"applied"`
	TotalEdges  int              `json:"total_edges"`
}

AntialiasingResult contains antialiasing analysis and suggestions.

type ApplyAutoShadingInput added in v0.4.0

type ApplyAutoShadingInput struct {
	SpritePath     string  `json:"sprite_path" jsonschema:"Path to .aseprite file"`
	LayerName      string  `json:"layer_name" jsonschema:"Layer to apply shading to"`
	FrameNumber    int     `json:"frame_number" jsonschema:"Frame number (1-based)"`
	LightDirection string  `json:"light_direction" jsonschema:"Light direction: top_left, top, top_right, left, right, bottom_left, bottom, bottom_right"`
	Intensity      float64 `json:"intensity" jsonschema:"Shading intensity (0.0-1.0)"`
	Style          string  `json:"style" jsonschema:"Shading style: cell, smooth, or soft"`
	HueShift       bool    `json:"hue_shift" jsonschema:"Apply hue shifting (shadows→cool, highlights→warm) default: true"`
}

ApplyAutoShadingInput defines the input parameters for the apply_auto_shading tool.

type ApplyAutoShadingOutput added in v0.4.0

type ApplyAutoShadingOutput struct {
	Success       bool     `json:"success" jsonschema:"Whether the operation succeeded"`
	ColorsAdded   int      `json:"colors_added" jsonschema:"Number of colors added to palette"`
	Palette       []string `json:"palette" jsonschema:"Final palette after shading"`
	RegionsShaded int      `json:"regions_shaded" jsonschema:"Number of regions shaded"`
}

ApplyAutoShadingOutput defines the output for the apply_auto_shading tool.

type ApplyOutlineInput

type ApplyOutlineInput struct {
	SpritePath  string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	LayerName   string `json:"layer_name" jsonschema:"Name of the layer to apply outline to"`
	FrameNumber int    `json:"frame_number" jsonschema:"Frame number (1-based index)"`
	Color       string `json:"color" jsonschema:"Outline color in hex format (#RRGGBB or #RRGGBBAA)"`
	Thickness   int    `json:"thickness" jsonschema:"Outline thickness in pixels (1-10)"`
}

ApplyOutlineInput defines the input parameters for the apply_outline tool.

type ApplyOutlineOutput

type ApplyOutlineOutput struct {
	Success bool `json:"success"`
}

ApplyOutlineOutput defines the output for the apply_outline tool.

type ApplyShadingInput

type ApplyShadingInput struct {
	SpritePath     string   `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	LayerName      string   `json:"layer_name" jsonschema:"Name of the layer to apply shading to"`
	FrameNumber    int      `json:"frame_number" jsonschema:"Frame number (1-based index)"`
	Region         Region   `json:"region" jsonschema:"Rectangular region to apply shading to"`
	Palette        []string `json:"palette" jsonschema:"Array of hex colors ordered darkest to lightest (#RRGGBB format)"`
	LightDirection string   `json:"light_direction" jsonschema:"Light direction: top_left, top, top_right, left, right, bottom_left, bottom, bottom_right"`
	Intensity      float64  `json:"intensity" jsonschema:"Shading intensity (0.0-1.0)"`
	Style          string   `json:"style" jsonschema:"Shading style: pillow, smooth, or hard"`
}

ApplyShadingInput defines the input parameters for the apply_shading tool.

type ComplementaryPair

type ComplementaryPair struct {
	Color1      string  `json:"color1"`
	Color2      string  `json:"color2"`
	Contrast    float64 `json:"contrast"`
	Description string  `json:"description"`
}

ComplementaryPair represents two complementary colors.

type CopySelectionInput

type CopySelectionInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
}

CopySelectionInput defines the input parameters for the copy_selection tool.

type CopySelectionOutput

type CopySelectionOutput struct {
	Success bool `json:"success" jsonschema:"Whether the copy was successful"`
}

CopySelectionOutput defines the output for the copy_selection tool.

type CreateCanvasInput

type CreateCanvasInput struct {
	Width     int    `json:"width" jsonschema:"Canvas width in pixels (1-65535)"`            // Sprite width in pixels (1-65535)
	Height    int    `json:"height" jsonschema:"Canvas height in pixels (1-65535)"`          // Sprite height in pixels (1-65535)
	ColorMode string `json:"color_mode" jsonschema:"Color mode: rgb, grayscale, or indexed"` // Color mode: "rgb", "grayscale", or "indexed"
}

CreateCanvasInput defines the input parameters for the create_canvas tool.

Creates a new sprite file with the specified dimensions and color mode. The sprite is saved as a .aseprite file in the configured temp directory.

type CreateCanvasOutput

type CreateCanvasOutput struct {
	FilePath string `json:"file_path" jsonschema:"Absolute path to the created Aseprite file"` // Absolute path to the created .aseprite file
}

CreateCanvasOutput defines the output for the create_canvas tool.

Returns the absolute path to the newly created sprite file.

type CreateTagInput

type CreateTagInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	TagName    string `json:"tag_name" jsonschema:"Name for the animation tag"`
	FromFrame  int    `json:"from_frame" jsonschema:"Starting frame number (1-based, inclusive)"`
	ToFrame    int    `json:"to_frame" jsonschema:"Ending frame number (1-based, inclusive)"`
	Direction  string `json:"direction" jsonschema:"Playback direction: forward, reverse, or pingpong"`
}

CreateTagInput defines the input parameters for the create_tag tool.

type CreateTagOutput

type CreateTagOutput struct {
	Success bool `json:"success" jsonschema:"Whether the tag was created successfully"`
}

CreateTagOutput defines the output for the create_tag tool.

type CropSpriteInput

type CropSpriteInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	X          int    `json:"x" jsonschema:"Crop region X coordinate"`
	Y          int    `json:"y" jsonschema:"Crop region Y coordinate"`
	Width      int    `json:"width" jsonschema:"Crop region width (must be positive)"`
	Height     int    `json:"height" jsonschema:"Crop region height (must be positive)"`
}

CropSpriteInput defines the input parameters for the crop_sprite tool.

type CropSpriteOutput

type CropSpriteOutput struct {
	Success bool `json:"success"`
}

CropSpriteOutput defines the output for the crop_sprite tool.

type CutSelectionInput

type CutSelectionInput struct {
	SpritePath  string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	LayerName   string `json:"layer_name" jsonschema:"Name of the layer to cut from"`
	FrameNumber int    `json:"frame_number" jsonschema:"Frame number to cut from (1-based index)"`
}

CutSelectionInput defines the input parameters for the cut_selection tool.

type CutSelectionOutput

type CutSelectionOutput struct {
	Success bool `json:"success" jsonschema:"Whether the cut was successful"`
}

CutSelectionOutput defines the output for the cut_selection tool.

type DeleteFrameInput

type DeleteFrameInput struct {
	SpritePath  string `json:"sprite_path" jsonschema:"Path to the sprite file"`
	FrameNumber int    `json:"frame_number" jsonschema:"Frame number to delete (1-based)"`
}

DeleteFrameInput defines the input parameters for the delete_frame tool.

type DeleteFrameOutput

type DeleteFrameOutput struct {
	Success bool `json:"success" jsonschema:"Whether the frame was deleted successfully"`
}

DeleteFrameOutput defines the output for the delete_frame tool.

type DeleteLayerInput

type DeleteLayerInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the sprite file"`
	LayerName  string `json:"layer_name" jsonschema:"Name of the layer to delete"`
}

DeleteLayerInput defines the input parameters for the delete_layer tool.

type DeleteLayerOutput

type DeleteLayerOutput struct {
	Success bool `json:"success" jsonschema:"Whether the layer was deleted successfully"`
}

DeleteLayerOutput defines the output for the delete_layer tool.

type DeleteTagInput

type DeleteTagInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	TagName    string `json:"tag_name" jsonschema:"Name of the tag to delete"`
}

DeleteTagInput defines the input parameters for the delete_tag tool.

type DeleteTagOutput

type DeleteTagOutput struct {
	Success bool `json:"success" jsonschema:"Deletion success status"`
}

DeleteTagOutput defines the output for the delete_tag tool.

type DeselectInput

type DeselectInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
}

DeselectInput defines the input parameters for the deselect tool.

type DeselectOutput

type DeselectOutput struct {
	Success bool `json:"success" jsonschema:"Whether deselect was successful"`
}

DeselectOutput defines the output for the deselect tool.

type Dimensions

type Dimensions struct {
	Width  int `json:"width"`
	Height int `json:"height"`
}

Dimensions represents width and height.

type DitheringZone

type DitheringZone struct {
	Region  aseprite.Region `json:"region"`
	Type    string          `json:"type"`    // "gradient", "texture"
	Colors  []string        `json:"colors"`  // Suggested palette colors for dithering
	Pattern string          `json:"pattern"` // "bayer_4x4", "checkerboard", etc.
	Reason  string          `json:"reason"`  // Explanation for suggestion
}

DitheringZone represents a suggested area for dithering.

type DownsampleImageInput

type DownsampleImageInput struct {
	SourcePath   string `json:"source_path" jsonschema:"Path to source image file (.aseprite, .png, .jpg, .bmp, .gif)"`
	TargetWidth  int    `json:"target_width" jsonschema:"Target width in pixels (1-65535)"`
	TargetHeight int    `json:"target_height" jsonschema:"Target height in pixels (1-65535)"`
	OutputPath   string `json:"output_path,omitempty" jsonschema:"Optional output path for downsampled sprite (defaults to temp directory)"`
}

DownsampleImageInput defines the input parameters for the downsample_image tool.

type DownsampleImageOutput

type DownsampleImageOutput struct {
	OutputPath   string `json:"output_path" jsonschema:"Path to the downsampled sprite file"`
	SourceWidth  int    `json:"source_width" jsonschema:"Original source image width"`
	SourceHeight int    `json:"source_height" jsonschema:"Original source image height"`
	TargetWidth  int    `json:"target_width" jsonschema:"Downsampled image width"`
	TargetHeight int    `json:"target_height" jsonschema:"Downsampled image height"`
}

DownsampleImageOutput defines the output for the downsample_image tool.

type DrawCircleInput

type DrawCircleInput struct {
	SpritePath  string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	LayerName   string `json:"layer_name" jsonschema:"Name of the layer to draw on"`
	FrameNumber int    `json:"frame_number" jsonschema:"Frame number to draw on (1-based)"`
	CenterX     int    `json:"center_x" jsonschema:"X coordinate of circle center"`
	CenterY     int    `json:"center_y" jsonschema:"Y coordinate of circle center"`
	Radius      int    `json:"radius" jsonschema:"Radius of circle in pixels"`
	Color       string `json:"color" jsonschema:"Hex color string in format #RRGGBB or #RRGGBBAA"`
	Filled      bool   `json:"filled" jsonschema:"Fill interior (true) or draw outline only (false)"`
	UsePalette  bool   `json:"use_palette,omitempty" jsonschema:"Snap colors to nearest palette color (default: false)"`
}

DrawCircleInput defines the input parameters for the draw_circle tool.

type DrawCircleOutput

type DrawCircleOutput struct {
	Success bool `json:"success" jsonschema:"Whether the circle was drawn successfully"`
}

DrawCircleOutput defines the output for the draw_circle tool.

type DrawContourInput

type DrawContourInput struct {
	SpritePath  string       `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	LayerName   string       `json:"layer_name" jsonschema:"Name of the layer to draw on"`
	FrameNumber int          `json:"frame_number" jsonschema:"Frame number to draw on (1-based)"`
	Points      []PointInput `json:"points" jsonschema:"Array of points to connect (minimum 2 points)"`
	Color       string       `json:"color" jsonschema:"Hex color string in format #RRGGBB or #RRGGBBAA"`
	Thickness   int          `json:"thickness" jsonschema:"Line thickness in pixels (1-100)"`
	Closed      bool         `json:"closed" jsonschema:"Connect last point to first to form a closed polygon (default: false)"`
	UsePalette  bool         `json:"use_palette,omitempty" jsonschema:"Snap colors to nearest palette color (default: false)"`
}

DrawContourInput defines the input parameters for the draw_contour tool.

type DrawContourOutput

type DrawContourOutput struct {
	Success bool `json:"success" jsonschema:"Whether the contour was drawn successfully"`
}

DrawContourOutput defines the output for the draw_contour tool.

type DrawLineInput

type DrawLineInput struct {
	SpritePath  string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	LayerName   string `json:"layer_name" jsonschema:"Name of the layer to draw on"`
	FrameNumber int    `json:"frame_number" jsonschema:"Frame number to draw on (1-based)"`
	X1          int    `json:"x1" jsonschema:"X coordinate of line start point"`
	Y1          int    `json:"y1" jsonschema:"Y coordinate of line start point"`
	X2          int    `json:"x2" jsonschema:"X coordinate of line end point"`
	Y2          int    `json:"y2" jsonschema:"Y coordinate of line end point"`
	Color       string `json:"color" jsonschema:"Hex color string in format #RRGGBB or #RRGGBBAA"`
	Thickness   int    `json:"thickness" jsonschema:"Line thickness in pixels (1-100)"`
	UsePalette  bool   `json:"use_palette,omitempty" jsonschema:"Snap colors to nearest palette color (default: false)"`
}

DrawLineInput defines the input parameters for the draw_line tool.

type DrawLineOutput

type DrawLineOutput struct {
	Success bool `json:"success" jsonschema:"Whether the line was drawn successfully"`
}

DrawLineOutput defines the output for the draw_line tool.

type DrawPixelsInput

type DrawPixelsInput struct {
	SpritePath  string       `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`                                // Path to the sprite file to modify
	LayerName   string       `json:"layer_name" jsonschema:"Name of the layer to draw on"`                                     // Target layer name
	FrameNumber int          `json:"frame_number" jsonschema:"Frame number to draw on (1-based)"`                              // 1-based frame index
	Pixels      []PixelInput `json:"pixels" jsonschema:"Array of pixels to draw"`                                              // Pixels to draw with positions and colors
	UsePalette  bool         `json:"use_palette,omitempty" jsonschema:"Snap colors to nearest palette color (default: false)"` // Snap to palette if true
}

DrawPixelsInput defines the input parameters for the draw_pixels tool.

Draws individual pixels at specified coordinates. Supports batch drawing for efficient bulk pixel operations. When UsePalette is true, colors are snapped to the nearest palette color using LAB color space distance.

type DrawPixelsOutput

type DrawPixelsOutput struct {
	PixelsDrawn int `json:"pixels_drawn" jsonschema:"Number of pixels successfully drawn"` // Count of pixels drawn
}

DrawPixelsOutput defines the output for the draw_pixels tool.

Reports the number of pixels successfully drawn.

type DrawRectangleInput

type DrawRectangleInput struct {
	SpritePath  string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	LayerName   string `json:"layer_name" jsonschema:"Name of the layer to draw on"`
	FrameNumber int    `json:"frame_number" jsonschema:"Frame number to draw on (1-based)"`
	X           int    `json:"x" jsonschema:"X coordinate of rectangle top-left corner"`
	Y           int    `json:"y" jsonschema:"Y coordinate of rectangle top-left corner"`
	Width       int    `json:"width" jsonschema:"Width of rectangle in pixels"`
	Height      int    `json:"height" jsonschema:"Height of rectangle in pixels"`
	Color       string `json:"color" jsonschema:"Hex color string in format #RRGGBB or #RRGGBBAA"`
	Filled      bool   `json:"filled" jsonschema:"Fill interior (true) or draw outline only (false)"`
	UsePalette  bool   `json:"use_palette,omitempty" jsonschema:"Snap colors to nearest palette color (default: false)"`
}

DrawRectangleInput defines the input parameters for the draw_rectangle tool.

type DrawRectangleOutput

type DrawRectangleOutput struct {
	Success bool `json:"success" jsonschema:"Whether the rectangle was drawn successfully"`
}

DrawRectangleOutput defines the output for the draw_rectangle tool.

type DrawWithDitherInput

type DrawWithDitherInput struct {
	SpritePath  string      `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	LayerName   string      `json:"layer_name" jsonschema:"Name of the layer to draw on"`
	FrameNumber int         `json:"frame_number" jsonschema:"Frame number to draw on (1-based)"`
	Region      RegionInput `json:"region" jsonschema:"Rectangular region to fill with dithering"`
	Color1      string      `json:"color1" jsonschema:"First color (hex #RRGGBB or #RRGGBBAA)"`
	Color2      string      `json:"color2" jsonschema:"Second color (hex #RRGGBB or #RRGGBBAA)"`
	Pattern     string      `` /* 193-byte string literal not displayed */
	Density     float64     `json:"density,omitempty" jsonschema:"Ratio of color1 to color2 (0.0-1.0, default: 0.5)"`
}

DrawWithDitherInput defines the input parameters for the draw_with_dither tool.

type DuplicateFrameInput

type DuplicateFrameInput struct {
	SpritePath  string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	SourceFrame int    `json:"source_frame" jsonschema:"Frame number to duplicate (1-based)"`
	InsertAfter int    `json:"insert_after" jsonschema:"Insert duplicated frame after this frame number (1-based, 0 = insert at end)"`
}

DuplicateFrameInput defines the input parameters for the duplicate_frame tool.

type DuplicateFrameOutput

type DuplicateFrameOutput struct {
	NewFrameNumber int `json:"new_frame_number" jsonschema:"Index of the newly created frame (1-based)"`
}

DuplicateFrameOutput defines the output for the duplicate_frame tool.

type EdgeSuggestion

type EdgeSuggestion struct {
	X              int    `json:"x"`
	Y              int    `json:"y"`
	CurrentColor   string `json:"current_color"`
	NeighborColor  string `json:"neighbor_color"`
	SuggestedColor string `json:"suggested_color"`
	Direction      string `json:"direction"` // diagonal_ne, diagonal_nw, diagonal_se, diagonal_sw
}

EdgeSuggestion represents a suggested antialiasing pixel placement.

type ExportSpriteInput

type ExportSpriteInput struct {
	SpritePath  string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	OutputPath  string `json:"output_path" jsonschema:"Output file path for exported image"`
	Format      string `json:"format" jsonschema:"Export format: png, gif, jpg, bmp"`
	FrameNumber int    `json:"frame_number" jsonschema:"Specific frame to export (0 = all frames, 1-based)"`
}

ExportSpriteInput defines the input parameters for the export_sprite tool.

type ExportSpriteOutput

type ExportSpriteOutput struct {
	ExportedPath string `json:"exported_path" jsonschema:"Path to the exported file"`
	FileSize     int64  `json:"file_size" jsonschema:"Size of exported file in bytes"`
}

ExportSpriteOutput defines the output for the export_sprite tool.

type ExportSpritesheetInput

type ExportSpritesheetInput struct {
	SpritePath  string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	OutputPath  string `json:"output_path" jsonschema:"Output file path for spritesheet"`
	Layout      string `json:"layout" jsonschema:"Spritesheet layout: horizontal, vertical, rows, columns, or packed"`
	Padding     int    `json:"padding" jsonschema:"Padding between frames in pixels (0-100)"`
	IncludeJSON bool   `json:"include_json" jsonschema:"Include JSON metadata file"`
}

ExportSpritesheetInput defines the input parameters for the export_spritesheet tool.

type ExportSpritesheetOutput

type ExportSpritesheetOutput struct {
	SpritesheetPath string  `json:"spritesheet_path" jsonschema:"Path to exported spritesheet"`
	MetadataPath    *string `json:"metadata_path,omitempty" jsonschema:"Path to JSON metadata if included"`
	FrameCount      int     `json:"frame_count" jsonschema:"Number of frames in spritesheet"`
}

ExportSpritesheetOutput defines the output for the export_spritesheet tool.

type FillAreaInput

type FillAreaInput struct {
	SpritePath  string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	LayerName   string `json:"layer_name" jsonschema:"Name of the layer to draw on"`
	FrameNumber int    `json:"frame_number" jsonschema:"Frame number to draw on (1-based)"`
	X           int    `json:"x" jsonschema:"X coordinate of starting point"`
	Y           int    `json:"y" jsonschema:"Y coordinate of starting point"`
	Color       string `json:"color" jsonschema:"Hex color string in format #RRGGBB or #RRGGBBAA"`
	Tolerance   int    `json:"tolerance" jsonschema:"Color matching tolerance (0-255, default 0)"`
	UsePalette  bool   `json:"use_palette,omitempty" jsonschema:"Snap colors to nearest palette color (default: false)"`
}

FillAreaInput defines the input parameters for the fill_area tool.

type FillAreaOutput

type FillAreaOutput struct {
	Success bool `json:"success" jsonschema:"Whether the fill operation was successful"`
}

FillAreaOutput defines the output for the fill_area tool.

type FlattenLayersInput added in v0.5.0

type FlattenLayersInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"` // Path to the sprite file to modify
}

FlattenLayersInput defines the input parameters for the flatten_layers tool.

Flattens all layers in a sprite into a single layer.

type FlattenLayersOutput added in v0.5.0

type FlattenLayersOutput struct {
	Success bool `json:"success" jsonschema:"Whether the layers were flattened successfully"` // True if the layers were flattened successfully
}

FlattenLayersOutput defines the output for the flatten_layers tool.

Indicates whether the layers were successfully flattened.

type FlipSpriteInput

type FlipSpriteInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	Direction  string `json:"direction" jsonschema:"Flip direction: horizontal or vertical"`
	Target     string `json:"target" jsonschema:"What to flip: sprite, layer, or cel (default: sprite)"`
}

FlipSpriteInput defines the input parameters for the flip_sprite tool.

type FlipSpriteOutput

type FlipSpriteOutput struct {
	Success bool `json:"success"`
}

FlipSpriteOutput defines the output for the flip_sprite tool.

type GetPaletteInput

type GetPaletteInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
}

GetPaletteInput defines the input parameters for the get_palette tool.

type GetPaletteOutput

type GetPaletteOutput struct {
	Colors []string `json:"colors" jsonschema:"Array of hex colors in the palette"`
	Size   int      `json:"size" jsonschema:"Number of colors in the palette"`
}

GetPaletteOutput defines the output for the get_palette tool.

type GetPixelsInput

type GetPixelsInput struct {
	SpritePath  string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`                                        // Path to the sprite file to read
	LayerName   string `json:"layer_name" jsonschema:"Name of the layer to read from"`                                           // Layer to read from
	FrameNumber int    `json:"frame_number" jsonschema:"Frame number to read from (1-based)"`                                    // 1-based frame index
	X           int    `json:"x" jsonschema:"X coordinate of top-left corner of region"`                                         // Top-left X coordinate
	Y           int    `json:"y" jsonschema:"Y coordinate of top-left corner of region"`                                         // Top-left Y coordinate
	Width       int    `json:"width" jsonschema:"Width of region to read"`                                                       // Region width in pixels
	Height      int    `json:"height" jsonschema:"Height of region to read"`                                                     // Region height in pixels
	Cursor      string `json:"cursor,omitempty" jsonschema:"Pagination cursor for fetching next page (optional)"`                // Cursor for next page (empty for first page)
	PageSize    int    `json:"page_size,omitempty" jsonschema:"Number of pixels to return per page (default: 1000, max: 10000)"` // Page size (default 1000, max 10000)
}

GetPixelsInput defines the input parameters for the get_pixels tool.

Reads pixel data from a rectangular region. Supports pagination for large regions to avoid memory/bandwidth issues. Default page size is 1000 pixels, max 10000.

type GetPixelsOutput

type GetPixelsOutput struct {
	Pixels      []PixelData `json:"pixels" jsonschema:"Array of pixels with coordinates and colors"`                           // Pixel data for current page
	NextCursor  string      `json:"next_cursor,omitempty" jsonschema:"Cursor for fetching next page (empty if no more pages)"` // Pagination cursor (empty if done)
	TotalPixels int         `json:"total_pixels" jsonschema:"Total number of pixels in the region"`                            // Total pixels in queried region
}

GetPixelsOutput defines the output for the get_pixels tool.

Returns pixel data with pagination support. NextCursor is empty when no more pages exist.

type GetSpriteInfoInput

type GetSpriteInfoInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"` // Path to the sprite file to inspect
}

GetSpriteInfoInput defines the input parameters for the get_sprite_info tool.

Retrieves metadata about an existing sprite file.

type GetSpriteInfoOutput

type GetSpriteInfoOutput struct {
	Width      int      `json:"width" jsonschema:"Sprite width in pixels"`                       // Sprite width in pixels
	Height     int      `json:"height" jsonschema:"Sprite height in pixels"`                     // Sprite height in pixels
	ColorMode  string   `json:"color_mode" jsonschema:"Color mode (rgb, grayscale, or indexed)"` // Color mode: "rgb", "grayscale", or "indexed"
	FrameCount int      `json:"frame_count" jsonschema:"Number of frames in the sprite"`         // Total number of animation frames
	LayerCount int      `json:"layer_count" jsonschema:"Number of layers in the sprite"`         // Total number of layers
	Layers     []string `json:"layers" jsonschema:"Names of all layers in the sprite"`           // Names of all layers from bottom to top
}

GetSpriteInfoOutput defines the output for the get_sprite_info tool.

Contains complete metadata about a sprite including dimensions, color mode, and animation/layer information.

type ImportImageInput

type ImportImageInput struct {
	SpritePath  string          `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	ImagePath   string          `json:"image_path" jsonschema:"Path to image file to import"`
	LayerName   string          `json:"layer_name" jsonschema:"Layer name for imported image"`
	FrameNumber int             `json:"frame_number" jsonschema:"Frame number to place image (1-based)"`
	Position    *aseprite.Point `json:"position,omitempty" jsonschema:"Position to place image (optional defaults to 0,0)"`
}

ImportImageInput defines the input parameters for the import_image tool.

type ImportImageOutput

type ImportImageOutput struct {
	Success bool `json:"success" jsonschema:"Import success status"`
}

ImportImageOutput defines the output for the import_image tool.

type LinkCelInput

type LinkCelInput struct {
	SpritePath  string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	LayerName   string `json:"layer_name" jsonschema:"Name of the layer"`
	SourceFrame int    `json:"source_frame" jsonschema:"Source frame with the cel to link (1-based)"`
	TargetFrame int    `json:"target_frame" jsonschema:"Target frame where linked cel will be created (1-based)"`
}

LinkCelInput defines the input parameters for the link_cel tool.

type LinkCelOutput

type LinkCelOutput struct {
	Success bool `json:"success" jsonschema:"Whether the cel was linked successfully"`
}

LinkCelOutput defines the output for the link_cel tool.

type MoveSelectionInput

type MoveSelectionInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	DX         int    `json:"dx" jsonschema:"Horizontal offset in pixels (can be negative)"`
	DY         int    `json:"dy" jsonschema:"Vertical offset in pixels (can be negative)"`
}

MoveSelectionInput defines the input parameters for the move_selection tool.

type MoveSelectionOutput

type MoveSelectionOutput struct {
	Success bool `json:"success" jsonschema:"Whether the selection was moved successfully"`
}

MoveSelectionOutput defines the output for the move_selection tool.

type PaletteHarmonyResult

type PaletteHarmonyResult struct {
	Complementary []ComplementaryPair `json:"complementary"`
	Triadic       []TriadicSet        `json:"triadic"`
	Analogous     []AnalogousSet      `json:"analogous"`
	Temperature   TemperatureAnalysis `json:"temperature"`
}

PaletteHarmonyResult contains the result of palette harmony analysis.

type PasteClipboardInput

type PasteClipboardInput struct {
	SpritePath  string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	LayerName   string `json:"layer_name" jsonschema:"Name of the layer to paste onto"`
	FrameNumber int    `json:"frame_number" jsonschema:"Frame number to paste onto (1-based index)"`
	X           *int   `json:"x,omitempty" jsonschema:"X coordinate for paste position (optional)"`
	Y           *int   `json:"y,omitempty" jsonschema:"Y coordinate for paste position (optional)"`
}

PasteClipboardInput defines the input parameters for the paste_clipboard tool.

type PasteClipboardOutput

type PasteClipboardOutput struct {
	Success bool `json:"success" jsonschema:"Whether the paste was successful"`
}

PasteClipboardOutput defines the output for the paste_clipboard tool.

type PixelData

type PixelData struct {
	X     int    `json:"x"`     // X coordinate in sprite space
	Y     int    `json:"y"`     // Y coordinate in sprite space
	Color string `json:"color"` // Color in hex format (#RRGGBBAA)
}

PixelData represents a single pixel with coordinates and color.

Used by get_pixels to return pixel information from sprite inspection.

type PixelInput

type PixelInput struct {
	X     int    `json:"x" jsonschema:"X coordinate of the pixel"`                           // X coordinate in sprite pixel space
	Y     int    `json:"y" jsonschema:"Y coordinate of the pixel"`                           // Y coordinate in sprite pixel space
	Color string `json:"color" jsonschema:"Hex color string in format #RRGGBB or #RRGGBBAA"` // Color in hex format (#RRGGBB or #RRGGBBAA)
}

PixelInput represents a single pixel to be drawn.

Used by draw_pixels to specify individual pixel positions and colors.

type PointInput

type PointInput struct {
	X int `json:"x" jsonschema:"X coordinate of the point"`
	Y int `json:"y" jsonschema:"Y coordinate of the point"`
}

PointInput represents a point in the contour.

type QuantizePaletteInput added in v0.4.0

type QuantizePaletteInput struct {
	SpritePath           string `json:"sprite_path" jsonschema:"Path to source .aseprite file"`
	TargetColors         int    `json:"target_colors" jsonschema:"Target palette size (2-256)"`
	Algorithm            string `json:"algorithm" jsonschema:"Quantization algorithm: median_cut (default), kmeans, or octree"`
	Dither               bool   `json:"dither" jsonschema:"Apply Floyd-Steinberg dithering during quantization (default: false)"`
	PreserveTransparency *bool  `json:"preserve_transparency,omitempty" jsonschema:"Keep transparent pixels transparent (default: true)"`
	ConvertToIndexed     *bool  `json:"convert_to_indexed,omitempty" jsonschema:"Convert sprite to indexed color mode (default: true)"`
}

QuantizePaletteInput defines the input parameters for the quantize_palette tool.

type QuantizePaletteOutput added in v0.4.0

type QuantizePaletteOutput struct {
	Success         bool     `json:"success" jsonschema:"Whether the operation succeeded"`
	OriginalColors  int      `json:"original_colors" jsonschema:"Number of unique colors in original sprite"`
	QuantizedColors int      `json:"quantized_colors" jsonschema:"Number of colors in quantized palette"`
	ColorMode       string   `json:"color_mode" jsonschema:"Color mode after quantization (indexed or rgb)"`
	Palette         []string `json:"palette" jsonschema:"Array of hex colors in the quantized palette"`
	AlgorithmUsed   string   `json:"algorithm_used" jsonschema:"Quantization algorithm that was used"`
}

QuantizePaletteOutput defines the output for the quantize_palette tool.

type Region

type Region struct {
	X      int `json:"x" jsonschema:"X coordinate of top-left corner"`
	Y      int `json:"y" jsonschema:"Y coordinate of top-left corner"`
	Width  int `json:"width" jsonschema:"Width of region"`
	Height int `json:"height" jsonschema:"Height of region"`
}

Region defines a rectangular region.

type RegionInput

type RegionInput struct {
	X      int `json:"x" jsonschema:"X coordinate of top-left corner"`
	Y      int `json:"y" jsonschema:"Y coordinate of top-left corner"`
	Width  int `json:"width" jsonschema:"Width of region"`
	Height int `json:"height" jsonschema:"Height of region"`
}

RegionInput defines a rectangular region.

type ResizeCanvasInput

type ResizeCanvasInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	Width      int    `json:"width" jsonschema:"New canvas width (1-65535)"`
	Height     int    `json:"height" jsonschema:"New canvas height (1-65535)"`
	Anchor     string `json:"anchor" jsonschema:"Anchor position: center, top_left, top_right, bottom_left, or bottom_right (default: center)"`
}

ResizeCanvasInput defines the input parameters for the resize_canvas tool.

type ResizeCanvasOutput

type ResizeCanvasOutput struct {
	Success bool `json:"success"`
}

ResizeCanvasOutput defines the output for the resize_canvas tool.

type RotateSpriteInput

type RotateSpriteInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	Angle      int    `json:"angle" jsonschema:"Rotation angle: 90, 180, or 270 degrees"`
	Target     string `json:"target" jsonschema:"What to rotate: sprite, layer, or cel (default: sprite)"`
}

RotateSpriteInput defines the input parameters for the rotate_sprite tool.

type RotateSpriteOutput

type RotateSpriteOutput struct {
	Success bool `json:"success"`
}

RotateSpriteOutput defines the output for the rotate_sprite tool.

type SaveAsInput

type SaveAsInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	OutputPath string `json:"output_path" jsonschema:"New .aseprite file path"`
}

SaveAsInput defines the input parameters for the save_as tool.

type SaveAsOutput

type SaveAsOutput struct {
	Success  bool   `json:"success" jsonschema:"Save success status"`
	FilePath string `json:"file_path" jsonschema:"Path to saved file"`
}

SaveAsOutput defines the output for the save_as tool.

type ScaleSpriteInput

type ScaleSpriteInput struct {
	SpritePath string  `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	ScaleX     float64 `json:"scale_x" jsonschema:"Horizontal scale factor (0.01 to 100.0)"`
	ScaleY     float64 `json:"scale_y" jsonschema:"Vertical scale factor (0.01 to 100.0)"`
	Algorithm  string  `json:"algorithm" jsonschema:"Scaling algorithm: nearest, bilinear, or rotsprite (default: nearest)"`
}

ScaleSpriteInput defines the input parameters for the scale_sprite tool.

type ScaleSpriteOutput

type ScaleSpriteOutput struct {
	Success   bool `json:"success"`
	NewWidth  int  `json:"new_width" jsonschema:"New sprite width after scaling"`
	NewHeight int  `json:"new_height" jsonschema:"New sprite height after scaling"`
}

ScaleSpriteOutput defines the output for the scale_sprite tool.

type SelectAllInput

type SelectAllInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
}

SelectAllInput defines the input parameters for the select_all tool.

type SelectAllOutput

type SelectAllOutput struct {
	Success bool `json:"success" jsonschema:"Whether select all was successful"`
}

SelectAllOutput defines the output for the select_all tool.

type SelectEllipseInput

type SelectEllipseInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	X          int    `json:"x" jsonschema:"X coordinate of selection ellipse bounding box"`
	Y          int    `json:"y" jsonschema:"Y coordinate of selection ellipse bounding box"`
	Width      int    `json:"width" jsonschema:"Width of selection ellipse (minimum 1)"`
	Height     int    `json:"height" jsonschema:"Height of selection ellipse (minimum 1)"`
	Mode       string `json:"mode" jsonschema:"Selection mode: replace, add, subtract, or intersect (default: replace)"`
}

SelectEllipseInput defines the input parameters for the select_ellipse tool.

type SelectEllipseOutput

type SelectEllipseOutput struct {
	Success bool `json:"success" jsonschema:"Whether the selection was created successfully"`
}

SelectEllipseOutput defines the output for the select_ellipse tool.

type SelectRectangleInput

type SelectRectangleInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	X          int    `json:"x" jsonschema:"X coordinate of selection rectangle"`
	Y          int    `json:"y" jsonschema:"Y coordinate of selection rectangle"`
	Width      int    `json:"width" jsonschema:"Width of selection rectangle (minimum 1)"`
	Height     int    `json:"height" jsonschema:"Height of selection rectangle (minimum 1)"`
	Mode       string `json:"mode" jsonschema:"Selection mode: replace, add, subtract, or intersect (default: replace)"`
}

SelectRectangleInput defines the input parameters for the select_rectangle tool.

type SelectRectangleOutput

type SelectRectangleOutput struct {
	Success bool `json:"success" jsonschema:"Whether the selection was created successfully"`
}

SelectRectangleOutput defines the output for the select_rectangle tool.

type SetFrameDurationInput

type SetFrameDurationInput struct {
	SpritePath  string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	FrameNumber int    `json:"frame_number" jsonschema:"Frame number to modify (1-based)"`
	DurationMs  int    `json:"duration_ms" jsonschema:"Frame duration in milliseconds (1-65535)"`
}

SetFrameDurationInput defines the input parameters for the set_frame_duration tool.

type SetFrameDurationOutput

type SetFrameDurationOutput struct {
	Success bool `json:"success" jsonschema:"Whether the frame duration was set successfully"`
}

SetFrameDurationOutput defines the output for the set_frame_duration tool.

type SetPaletteColorInput

type SetPaletteColorInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	Index      int    `json:"index" jsonschema:"Palette index (0-255)"`
	Color      string `json:"color" jsonschema:"Hex color to set (#RRGGBB format)"`
}

SetPaletteColorInput defines the input parameters for the set_palette_color tool.

type SetPaletteInput

type SetPaletteInput struct {
	SpritePath string   `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	Colors     []string `json:"colors" jsonschema:"Array of hex colors to set as palette (#RRGGBB format)"`
}

SetPaletteInput defines the input parameters for the set_palette tool.

type SortPaletteInput

type SortPaletteInput struct {
	SpritePath string `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	Method     string `json:"method" jsonschema:"Sort method: hue, saturation, brightness, or luminance"`
	Ascending  bool   `json:"ascending" jsonschema:"Sort in ascending order (default: true)"`
}

SortPaletteInput defines the input parameters for the sort_palette tool.

type SuggestAntialiasingInput

type SuggestAntialiasingInput struct {
	SpritePath  string  `json:"sprite_path" jsonschema:"Path to the Aseprite sprite file"`
	LayerName   string  `json:"layer_name" jsonschema:"Name of the layer to analyze"`
	FrameNumber int     `json:"frame_number" jsonschema:"Frame number to analyze (1-based)"`
	Region      *Region `json:"region,omitempty" jsonschema:"Region to analyze (defaults to entire sprite)"`
	Threshold   int     `json:"threshold,omitempty" jsonschema:"Edge detection sensitivity 0-255 (default: 128)"`
	AutoApply   bool    `json:"auto_apply,omitempty" jsonschema:"If true applies smoothing automatically (default: false)"`
	UsePalette  bool    `json:"use_palette,omitempty" jsonschema:"If true snaps intermediate colors to palette (default: false)"`
}

SuggestAntialiasingInput defines the input parameters for antialiasing suggestions.

type TemperatureAnalysis

type TemperatureAnalysis struct {
	WarmColors    []string `json:"warm_colors"`
	CoolColors    []string `json:"cool_colors"`
	NeutralColors []string `json:"neutral_colors"`
	Dominant      string   `json:"dominant"`
	Description   string   `json:"description"`
}

TemperatureAnalysis contains color temperature analysis.

type TriadicSet

type TriadicSet struct {
	Colors      []string `json:"colors"`
	Balance     float64  `json:"balance"`
	Description string   `json:"description"`
}

TriadicSet represents three colors evenly spaced on the color wheel.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL