{"ok":true,"site":{"host":"pixael.vercel.app","url":"https://pixael.vercel.app/","type":"live","desc":"Sprites","tools":[{"name":"list_assets","kind":"answer","impl":"imperative","description":"Lists all sprite assets in the project with their ID, name, category, dimensions (width, height), and animation state names.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"get_asset_details","kind":"answer","impl":"imperative","description":"Returns full details for a sprite asset including dimensions, palette swatches, and all animation states with frame counts and FPS.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The unique ID of the asset to inspect"}},"required":["assetId"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"get_current_selection","kind":"answer","impl":"imperative","description":"Returns the active asset, active animation state, and active frame index/ID currently selected in the live editor UI.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"get_frame_pixels","kind":"answer","impl":"imperative","description":"Returns compact run-length encoded (RLE) pixel data and palette for a frame. Index 0 is transparent; pairs are [colorIndex, runLength].","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID (optional if targeting currently active asset)"},"stateId":{"type":"string","description":"The animation state ID (optional if targeting active state)"},"frameId":{"type":"string","description":"Optional frame ID"},"frameIndex":{"type":"number","description":"Optional 0-based frame index"}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"get_animation_state","kind":"answer","impl":"imperative","description":"Returns fps, loop setting, frame count, and ordered frame IDs for an animation state.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The animation state ID"}},"required":["assetId","stateId"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"create_asset","kind":"act","impl":"imperative","description":"Creates a new sprite asset in the project with custom dimensions, name, category, and initial animation states.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the sprite asset (e.g. \"Knight\", \"Dragon\", \"Potion\")"},"width":{"type":"number","description":"Width in pixels (e.g. 16, 24, 32, 64; default 16)"},"height":{"type":"number","description":"Height in pixels (e.g. 16, 24, 32, 64; default 16)"},"category":{"type":"string","description":"Category name (e.g. \"Characters\", \"Enemies\", \"Environment\", \"Items\")"},"starterStates":{"type":"array","items":{"type":"string"},"description":"Optional initial state names (e.g. [\"Idle\", \"Walk\", \"Attack\"])"}},"required":["name"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"duplicate_asset","kind":"act","impl":"imperative","description":"Duplicates an existing sprite asset along with all its animation states, frames, and palette.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"ID of the asset to duplicate"},"newName":{"type":"string","description":"Optional new name for the clone"}},"required":["assetId"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"delete_asset","kind":"transact","impl":"imperative","description":"Deletes a sprite asset from the project. Cannot delete the last remaining asset.","annotations":{"readOnlyHint":false,"destructiveHint":true},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"ID of the asset to delete"}},"required":["assetId"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"resize_sprite","kind":"act","impl":"imperative","description":"Resizes sprite canvas dimensions (e.g. from 16x16 to 32x32) while preserving pixel art content according to the specified anchor.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID to resize"},"width":{"type":"number","description":"New width in pixels (minimum 4, maximum 128)"},"height":{"type":"number","description":"New height in pixels (minimum 4, maximum 128)"},"anchor":{"type":"string","enum":["center","top-left"],"description":"Placement anchor: \"center\" expands symmetrically; \"top-left\" anchors at (0,0)"}},"required":["assetId","width","height"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"create_animation_state","kind":"act","impl":"imperative","description":"Adds a new animation state (e.g. \"Walk\", \"Attack\", \"Jump\") with blank frames to a sprite asset.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"name":{"type":"string","description":"State name (e.g. \"Walk\", \"Attack\")"},"fps":{"type":"number","description":"Playback speed in FPS (1-60, default 8)"},"loop":{"type":"boolean","description":"Whether the animation loops (default true)"},"frameCount":{"type":"number","description":"Number of initial frames to create (default 1)"}},"required":["assetId","name"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"rename_animation_state","kind":"act","impl":"imperative","description":"Renames an existing animation state in a sprite asset.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The animation state ID"},"name":{"type":"string","description":"The new name for the state"}},"required":["assetId","stateId","name"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"delete_animation_state","kind":"transact","impl":"imperative","description":"Deletes an animation state from an asset. Cannot delete the last state of an asset.","annotations":{"readOnlyHint":false,"destructiveHint":true},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The state ID to delete"}},"required":["assetId","stateId"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"duplicate_animation_state","kind":"act","impl":"imperative","description":"Duplicates an animation state along with all its frames.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The state ID to duplicate"}},"required":["assetId","stateId"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"reorder_animation_states","kind":"act","impl":"imperative","description":"Reorders animation states within an asset by shifting a state from one index to another.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"fromIndex":{"type":"number","description":"The original 0-based index of the animation state to move"},"stateId":{"type":"string","description":"Optional ID of the state to move (if fromIndex is not supplied)"},"toIndex":{"type":"number","description":"The target 0-based index to place the animation state at"}},"required":["assetId","toIndex"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"set_animation_speed","kind":"act","impl":"imperative","description":"Sets the playback speed (FPS) for an animation state.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The animation state ID"},"fps":{"type":"number","description":"Frames per second (1 to 60)"}},"required":["assetId","stateId","fps"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"set_animation_loop","kind":"act","impl":"imperative","description":"Enables or disables continuous looping for an animation state.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The animation state ID"},"loop":{"type":"boolean","description":"True to loop continuously, false to play once"}},"required":["assetId","stateId","loop"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"play_animation","kind":"act","impl":"imperative","description":"Starts live animation preview in the application viewport.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"Optional asset ID to select for preview"},"stateId":{"type":"string","description":"Optional state ID to select for preview"}}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"pause_animation","kind":"act","impl":"imperative","description":"Pauses live animation preview in the application viewport.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"add_frame","kind":"act","impl":"imperative","description":"Adds a new blank frame or a copy of the previous frame to an animation state.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The animation state ID"},"insertAtIndex":{"type":"number","description":"Optional 0-based index to insert the new frame at (defaults to end)"},"copyPrevious":{"type":"boolean","description":"If true, duplicates pixel content from the previous frame; if false, creates a blank frame"}},"required":["assetId","stateId"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"duplicate_frame","kind":"act","impl":"imperative","description":"Duplicates an existing frame in an animation state.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The animation state ID"},"frameId":{"type":"string","description":"ID of the frame to duplicate"},"frameIndex":{"type":"number","description":"0-based frame index to duplicate (alternative to frameId)"}},"required":["assetId","stateId"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"delete_frame","kind":"transact","impl":"imperative","description":"Deletes a frame from an animation state. If deleting the last frame, it is automatically replaced with a blank frame.","annotations":{"readOnlyHint":false,"destructiveHint":true},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The animation state ID"},"frameId":{"type":"string","description":"ID of the frame to delete"},"frameIndex":{"type":"number","description":"0-based frame index to delete (alternative to frameId)"}},"required":["assetId","stateId"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"reorder_frames","kind":"act","impl":"imperative","description":"Reorders frames in an animation state by specifying an ordered array of frame IDs or fromIndex/toIndex.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The animation state ID"},"orderedFrameIds":{"type":"array","items":{"type":"string"},"description":"Array of all frame IDs in the desired order"},"fromIndex":{"type":"number","description":"Source 0-based index if shifting single frame"},"toIndex":{"type":"number","description":"Target 0-based index if shifting single frame"}},"required":["assetId","stateId"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"set_frame_pixels","kind":"act","impl":"imperative","description":"Replaces the entire pixel buffer of a frame using a compact Run-Length Encoded (RLE) payload (matching get_frame_pixels output format).","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The animation state ID"},"frameId":{"type":"string","description":"Optional frame ID"},"frameIndex":{"type":"number","description":"Optional 0-based frame index"},"payload":{"type":"object","properties":{"width":{"type":"number"},"height":{"type":"number"},"palette":{"type":"array","items":{"type":"string"}},"pixelsRle":{"type":"array","items":{"type":"number"}}},"required":["width","height","palette","pixelsRle"],"description":"Compact RLE frame payload"}},"required":["assetId","stateId","payload"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"set_pixels","kind":"act","impl":"imperative","description":"Sets specific pixel coordinates in a frame. Coordinates are 0-indexed with (0,0) at top-left. Pass colorIndex into palette (0 = transparent) or explicit hexColor.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The animation state ID"},"frameId":{"type":"string","description":"Optional frame ID"},"frameIndex":{"type":"number","description":"Optional 0-based frame index"},"pixels":{"type":"array","items":{"type":"object","properties":{"x":{"type":"number","description":"0-based X coordinate"},"y":{"type":"number","description":"0-based Y coordinate"},"colorIndex":{"type":"number","description":"0 for transparent, 1+ for palette color"},"hexColor":{"type":"string","description":"Optional hex color string (e.g. \"#ff004d\")"}},"required":["x","y"]},"description":"Array of pixel modifications"}},"required":["assetId","stateId","pixels"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"flood_fill","kind":"act","impl":"imperative","description":"Fills a contiguous area of identical color starting at (x, y) with a color from the palette or hex string.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The animation state ID"},"frameId":{"type":"string","description":"Optional frame ID"},"frameIndex":{"type":"number","description":"Optional 0-based frame index"},"x":{"type":"number","description":"X coordinate to begin fill (0 to width-1)"},"y":{"type":"number","description":"Y coordinate to begin fill (0 to height-1)"},"colorIndex":{"type":"number","description":"0 for transparent, 1+ for palette color"},"hexColor":{"type":"string","description":"Optional explicit hex color string"}},"required":["assetId","stateId","x","y"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"draw_line","kind":"act","impl":"imperative","description":"Draws a 1-pixel Bresenham line between (x0, y0) and (x1, y1) in a frame.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The animation state ID"},"frameId":{"type":"string","description":"Optional frame ID"},"frameIndex":{"type":"number","description":"Optional 0-based frame index"},"x0":{"type":"number","description":"Start X coordinate"},"y0":{"type":"number","description":"Start Y coordinate"},"x1":{"type":"number","description":"End X coordinate"},"y1":{"type":"number","description":"End Y coordinate"},"colorIndex":{"type":"number","description":"0 for transparent, 1+ for palette color"},"hexColor":{"type":"string","description":"Optional explicit hex color"}},"required":["assetId","stateId","x0","y0","x1","y1"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"draw_rectangle","kind":"act","impl":"imperative","description":"Draws a rectangle at (x, y) with specified width and height. Can be solid filled or 1-pixel outline.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The animation state ID"},"frameId":{"type":"string","description":"Optional frame ID"},"frameIndex":{"type":"number","description":"Optional 0-based frame index"},"x":{"type":"number","description":"Top-left X coordinate"},"y":{"type":"number","description":"Top-left Y coordinate"},"width":{"type":"number","description":"Width in pixels"},"height":{"type":"number","description":"Height in pixels"},"colorIndex":{"type":"number","description":"0 for transparent, 1+ for palette color"},"hexColor":{"type":"string","description":"Optional explicit hex color"},"filled":{"type":"boolean","description":"True for solid rectangle, false for 1px outline (default false)"}},"required":["assetId","stateId","x","y","width","height"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"flip_frame","kind":"act","impl":"imperative","description":"Flips all pixels in a frame horizontally (left-to-right) or vertically (top-to-bottom).","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The animation state ID"},"frameId":{"type":"string","description":"Optional frame ID"},"frameIndex":{"type":"number","description":"Optional 0-based frame index"},"axis":{"type":"string","enum":["horizontal","vertical"],"description":"Flip axis: \"horizontal\" or \"vertical\""}},"required":["assetId","stateId","axis"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"rotate_frame","kind":"act","impl":"imperative","description":"Rotates all pixels in a frame clockwise by 90, 180, or 270 degrees.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The animation state ID"},"frameId":{"type":"string","description":"Optional frame ID"},"frameIndex":{"type":"number","description":"Optional 0-based frame index"},"degrees":{"type":"number","enum":[90,180,270],"description":"Clockwise rotation in degrees (90, 180, 270)"}},"required":["assetId","stateId","degrees"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"shift_frame","kind":"act","impl":"imperative","description":"Shifts all pixels in a frame by dx (horizontal) and dy (vertical) pixels with wrap-around.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The animation state ID"},"frameId":{"type":"string","description":"Optional frame ID"},"frameIndex":{"type":"number","description":"Optional 0-based frame index"},"dx":{"type":"number","description":"Horizontal pixel offset (positive = right, negative = left)"},"dy":{"type":"number","description":"Vertical pixel offset (positive = down, negative = up)"}},"required":["assetId","stateId","dx","dy"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"clear_frame","kind":"act","impl":"imperative","description":"Clears all pixels in a frame to transparent.","annotations":{"readOnlyHint":false,"destructiveHint":true},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The animation state ID"},"frameId":{"type":"string","description":"Optional frame ID"},"frameIndex":{"type":"number","description":"Optional 0-based frame index"}},"required":["assetId","stateId"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"set_palette_preset","kind":"act","impl":"imperative","description":"Replaces an asset palette with one of the studio presets: \"Pixel Hero\", \"Fantasy RPG\", \"Cyberpunk Neon\", \"Retro Monochrome 4-Bit\", \"Dungeon 16\", \"Studio Gray Scale\".","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"presetName":{"type":"string","enum":["Pixel Hero","Fantasy RPG","Cyberpunk Neon","Retro Monochrome 4-Bit","Dungeon 16","Studio Gray Scale"],"description":"Name of the studio preset palette to apply"}},"required":["assetId","presetName"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"add_palette_color","kind":"act","impl":"imperative","description":"Adds a new hex color code to the asset palette.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"hexColor":{"type":"string","description":"Hex color string (e.g. \"#ff004d\", \"#00e436\")"}},"required":["assetId","hexColor"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"remove_palette_color","kind":"act","impl":"imperative","description":"Removes a color from an asset palette by colorIndex or hex string.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"colorIndex":{"type":"number","description":"1-based or 0-based index in the palette to remove"},"hexColor":{"type":"string","description":"Optional hex color string to remove (alternative to colorIndex)"}},"required":["assetId"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"set_palette_color","kind":"act","impl":"imperative","description":"Replaces a specific palette color swatch at a given index with a new hex color.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"colorIndex":{"type":"number","description":"0-based index in the palette to replace"},"hexColor":{"type":"string","description":"The new hex color (e.g. \"#3b82f6\")"}},"required":["assetId","colorIndex","hexColor"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"export_frame_png","kind":"act","impl":"imperative","description":"Renders and triggers download of a single frame as a PNG image at a specified pixel scale (1x, 2x, 4x, 8x, 16x).","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The animation state ID"},"frameId":{"type":"string","description":"Optional frame ID"},"frameIndex":{"type":"number","description":"Optional 0-based frame index"},"scale":{"type":"number","enum":[1,2,4,8,16],"description":"Pixel scaling factor (default 4)"}},"required":["assetId","stateId"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"export_sprite_sheet","kind":"act","impl":"imperative","description":"Generates and downloads a packed PNG sprite sheet for an animation state or entire asset with metadata.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"assetId":{"type":"string","description":"The asset ID"},"stateId":{"type":"string","description":"The animation state ID (optional: if omitted, exports all states)"},"layout":{"type":"string","enum":["horizontal","vertical","grid"],"description":"Sprite sheet layout arrangement (default \"horizontal\")"},"scale":{"type":"number","enum":[1,2,4,8,16],"description":"Pixel scale factor (default 1)"},"columns":{"type":"number","description":"Number of columns when layout is \"grid\""}},"required":["assetId"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"}],"category":"Media & Personal","favicon":"/favicons/pixael.vercel.app.svg","apiSurface":"spec","toolCount":37}}