ascii-motion-mcp
v3.0.1MCP (Model Context Protocol) server for Ascii-Motion - enabling LLM-powered tools to create, animate, import, and export ASCII art
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_cell
Get the character and colors at a specific canvas position
| Parameter | Type | Description |
|---|---|---|
x * | integer | X coordinate (0-based, left to right) |
y * | integer | Y coordinate (0-based, top to bottom) |
frameIndex | integer | Frame index (defaults to current frame) |
set_cell
Set the character and/or colors at a specific canvas position
| Parameter | Type | Description |
|---|---|---|
x * | integer | X coordinate (0-based) |
y * | integer | Y coordinate (0-based) |
bgColor | string | Background color (hex or "transparent") |
char | string | Single character to set |
color | string | Foreground color (hex, e.g., #FFFFFF) |
clear_cell
Clear a cell, resetting it to empty (space with transparent background)
| Parameter | Type | Description |
|---|---|---|
x * | integer | X coordinate |
y * | integer | Y coordinate |
set_cells_batch
Set multiple cells in a single operation. More efficient than calling set_cell repeatedly.
| Parameter | Type | Description |
|---|---|---|
cells * | array | Array of cells to set (max 10,000). Each cell can specify any combination of char, color, bgColor. |
paste_ascii_block
Paste a multi-line ASCII art block onto the canvas at a specified position. Great for pasting found ASCII art.
| Parameter | Type | Description |
|---|---|---|
text * | string | Multi-line ASCII text to paste |
bgColor | string | Background color for all pasted characters |
color | string | Text color for all pasted characters |
preserveSpaces | boolean | If true, spaces will overwrite existing cells. If false, spaces are transparent. |
x | integer | X position for top-left corner |
y | integer | Y position for top-left corner |
fill_region
Fill a region with a character and colors. Can be contiguous (flood fill) or global (all matching cells).
| Parameter | Type | Description |
|---|---|---|
char * | string | Character to fill with |
x * | integer | Starting X coordinate |
y * | integer | Starting Y coordinate |
bgColor | string | Fill background color |
color | string | Fill color |
contiguous | boolean | If true, only fills connected cells. If false, fills all matching cells. |
matchBgColor | boolean | Only fill cells that match the starting cell background |
matchChar | boolean | Only fill cells that match the starting cell character |
matchColor | boolean | Only fill cells that match the starting cell color |
resize_canvas
Resize the canvas. Content outside the new bounds will be clipped.
| Parameter | Type | Description |
|---|---|---|
height * | integer | New height (4-100) |
width * | integer | New width (4-200) |
clear_canvas
Clear all cells on the current frame, leaving it empty
list_frames
List all frames in the animation with their metadata
add_frame
Add a new frame to the animation
| Parameter | Type | Description |
|---|---|---|
atIndex | integer | Index to insert at (defaults to end) |
copyFromIndex | integer | Copy content from this frame index |
duration | integer | Frame duration in ms (default: 100) |
name | string | Frame name |
delete_frame
Delete a frame from the animation. Cannot delete the last remaining frame.
| Parameter | Type | Description |
|---|---|---|
index * | integer | Index of frame to delete |
duplicate_frame
Duplicate a frame, inserting the copy immediately after the original
| Parameter | Type | Description |
|---|---|---|
index * | integer | Index of frame to duplicate |
go_to_frame
Navigate to a specific frame, making it the current/active frame
| Parameter | Type | Description |
|---|---|---|
index * | integer | Frame index to navigate to |
set_frame_duration
Set the duration of a frame in milliseconds
| Parameter | Type | Description |
|---|---|---|
duration * | integer | Duration in milliseconds (10-60000) |
index * | integer | Frame index |
set_frame_name
Set or change the name of a frame
| Parameter | Type | Description |
|---|---|---|
index * | integer | Frame index |
name * | string | New frame name |
new_project
Create a new empty project, discarding any unsaved changes
| Parameter | Type | Description |
|---|---|---|
height | integer | Canvas height |
name | string | Project name |
template | string | Use a preset template |
width | integer | Canvas width |
save_project
Save the current project to a .asciimtn file
| Parameter | Type | Description |
|---|---|---|
filePath * | string | File path relative to project directory (e.g., "my-art.asciimtn") |
load_project
Load a project from a .asciimtn file
| Parameter | Type | Description |
|---|---|---|
filePath * | string | File path relative to project directory |
get_project_info
Get information about the current project
set_project_name
Set the project name
| Parameter | Type | Description |
|---|---|---|
name * | string | New project name |
list_project_files
List all .asciimtn project files in the project directory
| Parameter | Type | Description |
|---|---|---|
recursive | boolean | Search subdirectories |
get_canvas_summary
Get a compact summary of the canvas (dimensions, fill count, bounding box). Use this first to understand the canvas before requesting more detail.
| Parameter | Type | Description |
|---|---|---|
frameIndex | integer | Frame index (defaults to current) |
get_canvas_render
Render the current frame (or a bounded set of all frames) as raw ANSI-colored terminal text. The text payload contains actual ESC bytes and can be printed directly.
| Parameter | Type | Description |
|---|---|---|
allFrames | boolean | Render every frame with separators (maximum 24 frames) |
colorMode | string | ANSI color mode |
frameIndex | integer | Frame index (defaults to current). Cannot be combined with allFrames. |
maxWidth | integer | Downsample to at most this many character columns without upscaling |
trimEmpty | boolean | Trim empty outer rows and columns before rendering |
get_canvas_preview
Get non-empty cells in a region. Use for inspecting specific areas.
| Parameter | Type | Description |
|---|---|---|
frameIndex | integer | Frame index (defaults to current) |
maxCells | integer | Maximum cells to return |
offset | integer | Cell offset from the previous page |
region | object | Region to preview (defaults to entire canvas) |
get_canvas_ascii
Get the canvas as raw ASCII text (characters only, no color info). Good for verifying visual appearance.
| Parameter | Type | Description |
|---|---|---|
frameIndex | integer | Frame index (defaults to current) |
overlayPreviousFrame | boolean | Show previous frame content as dim (for motion context) |
region | object | Region to render (defaults to bounding box of content) |
trimEmpty | boolean | Trim empty rows/columns around content |
get_frame_diff
Get the cells that differ between two frames. Useful for understanding animation changes.
| Parameter | Type | Description |
|---|---|---|
frameA * | integer | First frame index |
frameB * | integer | Second frame index |
maxCells | integer | Maximum changed cells per page |
offset | integer | Changed-cell offset from the previous page |
describe_animation
Get a high-level description of the animation: frame count, timing, and motion patterns.
undo
Undo the last action
redo
Redo the last undone action
get_history_status
Check if undo/redo is available and what actions can be undone/redone
copy_frame_and_modify
Duplicate a frame and apply modifications in a single operation. Efficient for creating animation sequences.
| Parameter | Type | Description |
|---|---|---|
modifications * | array | Cell modifications to apply to the new frame |
sourceIndex * | integer | Index of frame to copy |
duration | integer | Duration for the new frame |
insertAtIndex | integer | Where to insert the new frame (defaults to after source) |
name | string | Name for the new frame |
shift_frame_content
Shift all content on the current frame by an x/y offset. Useful for creating scrolling or movement animations.
| Parameter | Type | Description |
|---|---|---|
dx * | integer | Horizontal shift (positive = right, negative = left) |
dy * | integer | Vertical shift (positive = down, negative = up) |
frameIndex | integer | Frame to shift (defaults to current) |
wrap | boolean | If true, content wraps around edges |
flip_region
Flip/mirror content horizontally or vertically
| Parameter | Type | Description |
|---|---|---|
direction * | string | Flip direction |
frameIndex | integer | Frame to flip (defaults to current) |
region | object | Region to flip (defaults to entire canvas) |
copy_region_to_frame
Copy a region of cells from one frame to another
| Parameter | Type | Description |
|---|---|---|
sourceFrame * | integer | Source frame index |
sourceRegion * | object | Region to copy from source |
targetFrame * | integer | Target frame index |
overwrite | boolean | If true, overwrite existing cells in target |
targetPosition | object | Position to paste at in target (defaults to same position) |
interpolate_frames
Generate intermediate frames between two keyframes. Creates smooth transitions.
| Parameter | Type | Description |
|---|---|---|
endFrame * | integer | Ending keyframe index |
startFrame * | integer | Starting keyframe index |
steps * | integer | Number of intermediate frames to generate |
method | string | Interpolation method |
select_rectangle
Select a rectangular region of the canvas
| Parameter | Type | Description |
|---|---|---|
height * | integer | Height of selection |
width * | integer | Width of selection |
x * | integer | Top-left X coordinate |
y * | integer | Top-left Y coordinate |
select_by_color
Select cells that match specific criteria (magic wand style)
| Parameter | Type | Description |
|---|---|---|
x * | integer | Starting X coordinate |
y * | integer | Starting Y coordinate |
contiguous | boolean | Only select connected cells |
matchBgColor | boolean | Match background color |
matchChar | boolean | Match character |
matchColor | boolean | Match foreground color |
get_selection
Get the current selection bounds and contents
| Parameter | Type | Description |
|---|---|---|
includeCells | boolean | Include the actual cell data in the response |
maxCells | integer | Maximum cells to include |
clear_selection
Clear the current selection (deselect)
apply_to_selection
Apply an operation to all cells in the current selection
| Parameter | Type | Description |
|---|---|---|
operation * | string | Operation to apply |
bgColor | string | Background color for fill/recolor |
char | string | Character for fill operation |
color | string | Color for fill/recolor |
delete_selection_content
Delete all cell content within the current selection
export_text
Export the current frame or all frames as plain text (.txt). Returns ASCII art as text.
| Parameter | Type | Description |
|---|---|---|
allFrames | boolean | Export all frames with separators |
filePath | string | File path to save to (relative to project dir). If omitted, returns content only. |
frameIndex | integer | Frame to export (defaults to current). Use "all" param for all frames. |
includeMetadata | boolean | Include frame names and timing as comments |
trimEmpty | boolean | Remove leading/trailing empty rows and columns |
export_json
Export the project as structured JSON data. Good for programmatic processing.
| Parameter | Type | Description |
|---|---|---|
filePath | string | File path to save to (relative to project dir). If omitted, returns content only. |
humanReadable | boolean | Pretty-print JSON |
includeEmptyCells | boolean | Include cells with default values |
includeMetadata | boolean | Include project metadata |
export_session
Export the project as an .asciimtn session file (can be loaded by Ascii-Motion app).
| Parameter | Type | Description |
|---|---|---|
filePath * | string | File path for the .asciimtn file (relative to project dir) |
export_html
Export the animation as a self-contained HTML file with embedded animation player.
| Parameter | Type | Description |
|---|---|---|
animationSpeed | number | Animation speed multiplier |
backgroundColor | string | Background color |
filePath | string | File path to save to. If omitted, returns HTML content. |
fontFamily | string | Font family |
fontSize | integer | Font size in pixels |
includeControls | boolean | Include play/pause controls |
loops | Number of loops |
export_react
Export the animation as a React component (JSX or TSX).
| Parameter | Type | Description |
|---|---|---|
componentName | string | React component name |
filePath | string | File path to save to |
includeControls | boolean | Include play/pause controls |
typescript | boolean | Use TypeScript (TSX) |
export_ansi
Export the current frame with ANSI escape codes for terminal display.
| Parameter | Type | Description |
|---|---|---|
colorMode | string | ANSI color mode |
frameIndex | integer | Frame to export (defaults to current) |
apply_effect
Apply a visual effect to the current frame or selection. Effects modify colors and/or characters.
| Parameter | Type | Description |
|---|---|---|
effect * | string | Type of effect to apply |
affectBackground | boolean | Apply color effects to background colors |
affectForeground | boolean | Apply color effects to foreground colors |
applyToSelection | boolean | Only apply effect within current selection |
brightness | number | Brightness adjustment (-100 to 100) |
characterMap | object | Map of old characters to new (e.g., {"@": "#", "*": "+"}) |
colorMap | object | Map of old colors to new colors (e.g., {"#FF0000": "#00FF00"}) |
contrast | number | Contrast adjustment (-100 to 100) |
frameIndex | integer | Frame to apply effect to (defaults to current) |
hue | number | Hue shift in degrees (-180 to 180) |
lightness | number | Lightness adjustment (-100 to 100) |
saturation | number | Saturation adjustment (-100 to 100) |
scatterAmount | number | Maximum pixel displacement for scatter effect |
targetPalette | array | Target color palette for automatic remapping |
get_color_stats
Get statistics about colors used in the current frame. Useful before applying color effects.
| Parameter | Type | Description |
|---|---|---|
frameIndex | integer | Frame to analyze (defaults to current) |
includeBackground | boolean | Include background colors in analysis |
batch_recolor
Replace one color with another across the entire frame or selection.
| Parameter | Type | Description |
|---|---|---|
newColor * | string | New color (hex format) |
oldColor * | string | Color to replace (hex format like #FF0000) |
frameIndex | integer | Frame to modify (defaults to current) |
target | string | Which colors to replace |
batch_replace_char
Replace one character with another across the entire frame or selection.
| Parameter | Type | Description |
|---|---|---|
newChar * | string | New character |
oldChar * | string | Character to replace |
frameIndex | integer | Frame to modify (defaults to current) |
get_effect_blocks
List all procedural effect blocks across layers, groups, and global effects. Shows effect type, timing, enabled status, and keyframe count.
| Parameter | Type | Description |
|---|---|---|
ownerId | string | Filter by owner layer/group ID. Omit to show all. |
add_effect_block
Add a non-destructive procedural effect to a layer, group, or global effects. Available types: levels, hue-saturation, remap-colors, remap-characters, scatter, wave-warp, wiggle, motion-trails.
| Parameter | Type | Description |
|---|---|---|
effectType * | string | Type of effect to add |
ownerId * | string | null | Layer or group ID to add effect to, or null for global effects |
durationFrames | integer | Duration in frames (defaults to timeline duration) |
settings | object | Initial effect settings |
startFrame | integer | Start frame (defaults to 0) |
update_effect_block
Update a procedural effect block's settings, timing, or enabled state.
| Parameter | Type | Description |
|---|---|---|
blockId * | string | Effect block ID to update |
durationFrames | integer | New duration in frames |
enabled | boolean | Enable/disable the effect |
settings | object | Settings to merge (partial update) |
startFrame | integer | New start frame |
remove_effect_block
Remove a procedural effect block from its owner (layer, group, or global).
| Parameter | Type | Description |
|---|---|---|
blockId * | string | Effect block ID to remove |
add_effect_keyframe
Add a keyframe to a procedural effect property. Creates the property track if it doesn't exist.
| Parameter | Type | Description |
|---|---|---|
blockId * | string | Effect block ID |
frame * | integer | Frame number for the keyframe |
propertyPath * | string | Property path (e.g., "amplitude", "hue", "strength") |
value * | number | boolean | string | Keyframe value |
remove_effect_keyframe
Remove a keyframe from a procedural effect property track.
| Parameter | Type | Description |
|---|---|---|
blockId * | string | Effect block ID |
keyframeId * | string | Keyframe ID to remove |
run_generator
Generate procedural animation frames as baked, static cells (legacy). For live, keyframeable generator layers (Ascii-Motion 2.2.5+), use add_generator_layer / add_animated_text instead.
| Parameter | Type | Description |
|---|---|---|
generator * | string | Generator type |
backgroundColor | string | Background color |
centerX | integer | Wave center X (defaults to canvas center) |
centerY | integer | Wave center Y (defaults to canvas center) |
characterSet | string | Custom characters to use (overrides default) |
color | string | Primary color (hex) |
density | number | Density of elements (0-1) |
frameCount | integer | Number of frames to generate |
frameDuration | integer | Duration of each frame in ms |
gravity | number | Gravity effect (-1 to 1) |
noiseScale | number | Noise scale (smaller = more detailed) |
noiseSpeed | number | How fast noise evolves |
particleCount | integer | Number of particles |
replaceFrames | boolean | Replace existing frames (otherwise append) |
secondaryColor | string | Secondary color for gradients |
seed | integer | Random seed for reproducibility |
speed | number | Animation speed multiplier |
trailLength | integer | Length of trails |
waveCount | integer | Number of simultaneous waves |
waveSpeed | number | Wave expansion speed |
preview_generator
Preview a single frame from a generator without applying to the project.
| Parameter | Type | Description |
|---|---|---|
generator * | string | Generator type |
color | string | Primary color |
density | number | Element density |
seed | integer | Random seed |
list_generator_types
List procedural generator types (radio-waves, turbulent-noise, particle-physics, rain-drops, digital-rain, animated-text). Pass generatorType to get every keyframeable property: path, type, range, options, default, whether it animates smoothly or stepped, and when it is active (e.g. wave.* only applies when effect is "wave"). Use these paths with the other generator tools.
| Parameter | Type | Description |
|---|---|---|
category | string | Only include properties in this category (e.g. "Mapping", "Animation") |
generatorType | string | Generator type to describe in full |
get_generator_layers
List procedural generator layers, or inspect one in detail: its span, static settings, keyframed tracks, and the fully-resolved settings at a frame.
| Parameter | Type | Description |
|---|---|---|
frame | integer | Frame to resolve animated settings at (default: current frame) |
layerId | string | Generator layer to inspect in detail (omit to list all) |
add_generator_layer
Add a procedural generator layer (live, keyframeable — not baked cells). Uses canvas-aware defaults (centered origin/text, random seed) and merges any settings you pass. Span defaults to the whole timeline. Call list_generator_types first for property paths.
| Parameter | Type | Description |
|---|---|---|
generatorType * | string | Generator type: radio-waves, turbulent-noise, particle-physics, rain-drops, digital-rain, animated-text |
durationFrames | integer | Visible span length (default: to the end of the timeline) |
name | string | Layer name (default: generator name) |
settings | object | Static settings keyed by property path (see list_generator_types), e.g. { "wave.amplitude": 3, "textColor": "#00ff88" } |
startFrame | integer | First visible frame (default 0) |
add_animated_text
Add an Animated Text generator layer: crisp text with optional typewriter reveal, blink, or wave effects — all keyframeable. Text is centered unless x/y are given. For typewriter, the reveal runs across the span (or revealFrames). Use set_generator_property / set_generator_keyframes afterwards for finer control.
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to display (use \n for multiple lines) |
align | string | Line alignment |
backgroundColor | string | Background color or "transparent" |
cursor | boolean | Typewriter only: show a cursor |
durationFrames | integer | Visible span length (default: to the end of the timeline) |
effect | string | Animation effect (default none) |
name | string | Layer name |
revealFrames | integer | Typewriter only: frames to fully reveal the text, starting at startFrame |
settings | object | Any other Animated Text settings (e.g. { "wave.amplitude": 2, "blink.onFrames": 6 }) |
startFrame | integer | First visible frame (default 0) |
textColor | string | Text color (default: current foreground color) |
x | integer | Left column of the text box (default: centered) |
y | integer | Top row of the text box (default: centered) |
update_generator_layer
Update a generator layer's static settings, visible span, enabled state, or name in one undoable step. Static settings are ignored for keyframed properties — use set_generator_property/set_generator_keyframes for those.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | Generator layer ID |
durationFrames | integer | New visible span length |
enabled | boolean | Enable/disable rendering |
name | string | Rename the layer |
settings | object | Static settings keyed by property path (see list_generator_types), e.g. { "wave.amplitude": 3, "textColor": "#00ff88" } |
shiftKeyframes | boolean | When moving startFrame, shift all keyframes by the same amount (default false) |
startFrame | integer | New first visible frame |
set_generator_property
Set one generator property the way the app's inspector does at the playhead: if the property is keyframed, this adds/updates a keyframe at `frame`; otherwise it changes the static value. Animated Text extras: setting typewriter.units converts start/end so the reveal is unchanged, and setting effect to "typewriter" adds a default 0→100% reveal across the span (disable with applyEffectDefaults:false).
| Parameter | Type | Description |
|---|---|---|
layerId * | string | Generator layer ID |
propertyPath * | string | Property path from list_generator_types (e.g. "wave.amplitude", "text", "mapping.characterPaletteId") |
value * | Property value: number, boolean, string, hex color ("#ff8800"/"transparent"), select option value, or mapping object | |
applyEffectDefaults | boolean | Animated Text: add default typewriter keyframes when switching effect to typewriter (default true) |
frame | integer | Frame for keyed edits (default: current frame) |
set_generator_keyframes
Keyframe a generator property: add one or more keyframes (absolute frames) with easing. A keyframe on an existing frame is replaced. Use replace:true to discard the track's previous keyframes, and loop:true to repeat the keyframed range. Before the first and after the last keyframe the value holds.
| Parameter | Type | Description |
|---|---|---|
keyframes * | array | Keyframes to add |
layerId * | string | Generator layer ID |
propertyPath * | string | Property path from list_generator_types |
loop | boolean | Loop the keyframed range |
replace | boolean | Remove existing keyframes on this property first (default false) |
remove_generator_keyframes
Remove keyframes from a generator property by frame or keyframe ID, or clear the whole track (clearTrack:true). When a track is removed (or becomes empty), the value at `frame` becomes the static setting, like the app.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | Generator layer ID |
propertyPath * | string | Keyframed property path |
clearTrack | boolean | Remove the entire track |
frame | integer | Frame whose value becomes static when the track is removed (default: current frame) |
frames | array | Remove keyframes on these frames |
keyframeIds | array | Remove keyframes with these IDs |
reset_generator
Reset a generator to its creation defaults and remove all of its keyframes (the seed is kept).
| Parameter | Type | Description |
|---|---|---|
layerId * | string | Generator layer ID |
randomize_generator_seed
Pick a new random seed for a generator (new variation of noise/particles/rain). If the seed is keyframed, keys the new seed at `frame`.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | Generator layer ID |
frame | integer | Frame to key the seed at when the seed is animated (default: current frame) |
render_generator_frames
Render a generator layer's output at specific frames as ASCII text (generator only — no layer transforms, effects, or other layers). Use it to check what an animation looks like. Requires a live browser connection. Max 60 frames per call.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | Generator layer ID |
frames | array | Frames to render (default: current frame) |
includeCells | boolean | Also return per-cell char/color data (default false) |
bake_generator_layer
Convert a generator layer into a normal content layer by rendering every frame of its span into editable cells (undoable in the app). The layer stops being procedural. Requires a live browser connection.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | Generator layer ID |
export_ink
Export the current frame as an Ink (React CLI) component for Node.js terminal apps.
| Parameter | Type | Description |
|---|---|---|
componentName | string | Name for the component |
filePath | string | File path to save (.tsx file). If omitted, returns content only. |
frameIndex | integer | Frame to export (defaults to current) |
includeAnimation | boolean | Export all frames with animation support |
export_bubbletea
Export the current frame as a Bubbletea (Go TUI) component.
| Parameter | Type | Description |
|---|---|---|
filePath | string | File path to save (.go file). If omitted, returns content only. |
frameIndex | integer | Frame to export (defaults to current) |
includeAnimation | boolean | Export all frames with animation support |
modelName | string | Model name. The connected app supports "Model"; custom names are headless-only. |
packageName | string | Go package name |
export_opentui
Export an OpenTUI TypeScript component through the connected app. The obsolete Python className option is not supported.
| Parameter | Type | Description |
|---|---|---|
className | string | Removed Python export option; returns UNSUPPORTED. Use componentName instead. |
componentName | string | PascalCase alphanumeric component name |
filePath | string | File path to save (.tsx file). If omitted, returns an artifact. |
frameIndex | integer | Frame to export (defaults to current) |
includeAnimation | boolean | Export all frames with animation support |
import_image
Convert an image through the connected app, overlaying non-empty cells on the targeted content frame. Use import_media for a new layer, replacement or native palette options. Headless mode requires optional sharp or jimp.
| Parameter | Type | Description |
|---|---|---|
filePath * | string | Path to the image file (.png, .jpg, .gif, .bmp) |
charset | string | Characters to use for brightness mapping (dark to bright) |
colorMode | string | How to apply colors |
dithering | string | Dithering algorithm to use |
frameIndex | integer | Frame to import to (defaults to current) |
offsetX | integer | X offset on canvas |
offsetY | integer | Y offset on canvas |
targetHeight | integer | Target height in characters. If omitted, maintains aspect ratio. |
targetWidth | integer | Target width in characters. If omitted, uses canvas width. |
import_video
Import video frames through the connected app with an explicit sampling rate and time window. Headless video import is not supported.
| Parameter | Type | Description |
|---|---|---|
filePath * | string | Path to the video file (.mp4, .webm, .mov, .gif) |
charset | string | Characters to use for brightness mapping (dark to bright) |
colorMode | string | How to apply colors |
duration | number | Duration in seconds (omit for entire video) |
fps | number | Frames per second to extract |
maxFrames | integer | Maximum number of frames to import |
startTime | number | Start time in seconds |
targetHeight | integer | Target height in characters. If omitted, maintains aspect ratio. |
targetWidth | integer | Target width in characters. If omitted, uses canvas width. |
import_ascii_text
Import ASCII art from a plain text file onto the canvas.
| Parameter | Type | Description |
|---|---|---|
filePath * | string | Path to the text file |
bgColor | string | Background color for imported text |
color | string | Foreground color for imported text |
frameIndex | integer | Frame to import to (defaults to current) |
offsetX | integer | X offset on canvas |
offsetY | integer | Y offset on canvas |
replaceSpaces | boolean | Whether to set cells for space characters |
list_character_palettes
List all available character palettes for ASCII art.
get_character_palette
Get all characters from a specific palette.
| Parameter | Type | Description |
|---|---|---|
paletteId * | string | Palette ID |
list_color_palettes
List all available color palettes.
get_color_palette
Get all colors from a specific palette.
| Parameter | Type | Description |
|---|---|---|
paletteId * | string | Palette ID |
get_active_colors
Get the currently active foreground and background colors.
set_foreground_color
Set the active foreground (text) color.
| Parameter | Type | Description |
|---|---|---|
color * | string | Hex color (e.g., #FF0000) |
set_background_color
Set the active background color.
| Parameter | Type | Description |
|---|---|---|
color * | string | Hex color or "transparent" |
set_selected_character
Set the active character used for drawing.
| Parameter | Type | Description |
|---|---|---|
character * | string | Single character |
suggest_palette_for_style
Get palette recommendations for a specific style.
| Parameter | Type | Description |
|---|---|---|
style * | string | Style theme |
refresh_state_from_browser
Request the browser to send its current state. Use this before reading canvas data to ensure you have the latest state. Returns success if browser is connected and responded.
compare_frames
Compare two frames and show what cells changed between them. Useful for understanding motion and edits in an animation.
| Parameter | Type | Description |
|---|---|---|
frameA * | integer | Index of first frame |
frameB * | integer | Index of second frame |
maxCells | integer | Maximum cells per page |
offset | integer | Continue from the previous nextOffset |
showUnchanged | boolean | Include unchanged cells in output |
get_layers
Get all layers in the project with their metadata, content frame count, and property track info.
add_layer
Add a new layer to the project. If project is in legacy frame mode, this switches it to layer mode.
| Parameter | Type | Description |
|---|---|---|
name | string | Layer name (auto-generated if omitted) |
remove_layer
Remove a layer by ID. Cannot remove the last remaining layer.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | ID of the layer to remove |
duplicate_layer
Duplicate a layer with all its content frames and property tracks.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | ID of the layer to duplicate |
set_active_layer
Set which layer is active for drawing and editing operations.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | ID of the layer to make active |
rename_layer
Rename a layer.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | ID of the layer to rename |
name * | string | New layer name |
reorder_layers
Move a layer from one z-order position to another. Index 0 = bottom layer.
| Parameter | Type | Description |
|---|---|---|
fromIndex * | integer | Current index of the layer |
toIndex * | integer | Target index to move to |
set_layer_visibility
Set visibility, solo, lock, or opacity on a layer.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | Layer ID |
locked | boolean | Set locked state |
opacity | number | Set opacity (0-100) |
solo | boolean | Set solo mode |
visible | boolean | Set visibility |
add_content_frame
Add a new content frame (canvas data segment) to a layer at a specific timeline position.
| Parameter | Type | Description |
|---|---|---|
durationFrames * | integer | Duration in frames |
layerId * | string | Layer ID |
startFrame * | integer | Starting frame number |
data | object | Initial cell data for the content frame |
remove_content_frame
Remove a content frame from a layer.
| Parameter | Type | Description |
|---|---|---|
contentFrameId * | string | Content frame ID to remove |
layerId * | string | Layer ID |
add_keyframe
Add a keyframe to a layer property track. Creates the property track if it doesn't exist.
| Parameter | Type | Description |
|---|---|---|
frame * | integer | Frame number |
layerId * | string | Layer ID |
propertyPath * | string | Property to keyframe (e.g., transform.position.x) |
value * | number | Keyframe value |
easing | object | Easing curve (defaults to linear) |
remove_keyframe
Remove a keyframe from a property track.
| Parameter | Type | Description |
|---|---|---|
keyframeId * | string | Keyframe ID to remove |
layerId * | string | Layer ID |
trackId * | string | Property track ID |
get_layer_properties
Get all transform property values for a layer at the current frame, including keyframe status.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | Layer ID |
create_group
Create a layer group to organize layers together.
| Parameter | Type | Description |
|---|---|---|
layerIds | array | Layer IDs to include in the group |
name | string | Group name |
ungroup_layers
Dissolve a layer group, keeping the layers.
| Parameter | Type | Description |
|---|---|---|
groupId * | string | Group ID to dissolve |
set_frame_rate
Set the timeline frame rate (FPS). Preserves frame count — only changes playback speed.
| Parameter | Type | Description |
|---|---|---|
fps * | integer | Frames per second |
set_timeline_duration
Set the total timeline duration in frames.
| Parameter | Type | Description |
|---|---|---|
durationFrames * | integer | Total frames in timeline |
get_connection_status
Check browser connection status. Returns whether browser is connected and client count
get_auth_token
Get the authentication token for browser connection.
export_image
Export the current frame as an image (PNG, JPG, or SVG). The browser renders the image at full quality. Requires live mode with a connected browser.
| Parameter | Type | Description |
|---|---|---|
filePath * | string | File path to save (relative to project dir). Extension determines format (.png, .jpg, .svg). |
format | string | Image format (auto-detected from file extension if omitted) |
frameIndex | integer | Frame to export (defaults to current frame) |
includeGrid | boolean | Include grid lines in the export |
quality | integer | JPEG quality (1-100, only used for JPG format) |
sizeMultiplier | number | Size multiplier (1x, 2x, 3x, or 4x) |
export_video
Export the animation as a video file (MP4 or WebM). The browser renders each frame and encodes the video. Requires live mode with a connected browser.
| Parameter | Type | Description |
|---|---|---|
filePath * | string | File path to save (relative to project dir). Extension determines format (.mp4, .webm). |
format | string | Video format (auto-detected from file extension if omitted) |
frameRange | object | Frame range to export (defaults to all frames) |
frameRate | Frame rate in fps, or "auto" to use project frame rate | |
includeGrid | boolean | Include grid lines in the export |
loops | string | Number of times to loop the animation in the video |
quality | string | Encoding quality |
sizeMultiplier | number | Size multiplier (1x, 2x, or 4x) |
get_capabilities
Contract/version info, supported operations, runtime catalogs summary, auth and entitlement state.
| Parameter | Type | Description |
|---|---|---|
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
get_document
Full native project session (.asciimtn v2) including layers, groups, effects, shaders, generators, typography, palettes and tool state.
| Parameter | Type | Description |
|---|---|---|
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
get_document_summary
Compact structure: canvas, timeline, layers/groups with content-frame ranges, effects, shaders, selection and history flags. No cell data.
| Parameter | Type | Description |
|---|---|---|
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
read_cells
Read cells at a timeline frame. scope "composite" = app compositor output (transforms, effects, generators; shaders excluded). scope "layer" = raw content frame data in layer-local coordinates.
| Parameter | Type | Description |
|---|---|---|
contentFrameId | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
format | string | |
frame | integer | Defaults to the playhead |
includeEffects | boolean | |
layerId | string | |
region | ||
scope | string |
get_catalog
Runtime catalogs: effect/shader/generator types with property schemas, palettes, export formats and settings, FIGlet fonts, box styles, brush shapes, autofill palettes.
| Parameter | Type | Description |
|---|---|---|
family * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
app_get_selection
Current selection mask (cells, bounds) and clipboard availability.
| Parameter | Type | Description |
|---|---|---|
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
get_history
Undo/redo availability and recent history descriptions.
| Parameter | Type | Description |
|---|---|---|
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
app_new_project
Reset to a new blank project (same as File → New): one layer, cleared history, detached from cloud.
| Parameter | Type | Description |
|---|---|---|
backgroundColor | ||
description | string | |
durationFrames | integer | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
frameRate | integer | |
height | integer | |
name | string | |
width | integer |
app_load_project
Replace the open project with a native session (v1 or v2) using the app importer.
| Parameter | Type | Description |
|---|---|---|
session * | ||
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
set_project_metadata
Set project name and/or description.
| Parameter | Type | Description |
|---|---|---|
description | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
name | string |
app_resize_canvas
Resize canvas across all layers/content frames, keeping content pinned to anchor (default top-left).
| Parameter | Type | Description |
|---|---|---|
height * | integer | |
width * | integer | |
anchor | ||
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
crop_canvas
Crop the canvas to a region (or the current selection bounds) across all layers.
| Parameter | Type | Description |
|---|---|---|
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
region |
set_canvas_background
Set canvas background color ("transparent" allowed).
| Parameter | Type | Description |
|---|---|---|
color * | ||
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
set_typography
Set font, font size, character spacing and line spacing used for rendering/export.
| Parameter | Type | Description |
|---|---|---|
characterSpacing | number | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
fontId | string | |
fontSize | number | |
lineSpacing | number |
set_tool_state
Set current drawing character/colors and active tool (used as defaults by drawing operations).
| Parameter | Type | Description |
|---|---|---|
backgroundColor | ||
character | ||
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
foregroundColor | ||
tool | string |
set_cells
Write or erase cells in one content frame.
| Parameter | Type | Description |
|---|---|---|
cells * | array | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
target |
clear_cells
Erase a region, the current selection, or the whole content frame.
| Parameter | Type | Description |
|---|---|---|
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
region | ||
target | ||
useSelection | boolean |
app_fill_region
Fill a rectangular region or the current selection with one cell style.
| Parameter | Type | Description |
|---|---|---|
cell * | ||
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
region | ||
target | ||
useSelection | boolean |
import_text
Place multi-line plain text; spaces become blank cells unless keepSpaces.
| Parameter | Type | Description |
|---|---|---|
text * | string | |
clearFirst | boolean | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
keepSpaces | boolean | |
style | ||
target | ||
x | integer | |
y | integer |
shift_content
Shift all cells of a content frame by dx/dy, optionally wrapping around the canvas.
| Parameter | Type | Description |
|---|---|---|
dx * | integer | |
dy * | integer | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
target | ||
wrap | boolean |
flip_content
Flip a region, the selection, or the whole canvas horizontally/vertically.
| Parameter | Type | Description |
|---|---|---|
axis * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
region | ||
target | ||
useSelection | boolean |
replace_in_cells
Find/replace characters and/or colors in non-empty cells of one content frame, a layer, or the whole project. match: {} matches every non-empty cell. region/useSelection restrict the edit to those cells (scope "content_frame" only); unmatched fields of each cell are preserved.
| Parameter | Type | Description |
|---|---|---|
match * | object | {} = all non-empty cells |
replace * | object | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
region | ||
scope | string | |
target | ||
useSelection | boolean | Restrict to the current selection mask (no coordinates need to be transferred) |
draw_brush_stroke
Pencil/eraser stroke through points with brush size and shape (aspect-ratio aware, respects selection mask).
| Parameter | Type | Description |
|---|---|---|
points * | array | |
erase | boolean | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
shape | string | |
size | integer | |
style | ||
target |
draw_line
Straight line between two cells (Bresenham), optional brush size.
| Parameter | Type | Description |
|---|---|---|
from * | ||
to * | ||
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
shape | string | |
size | integer | |
style | ||
target |
draw_shape
Rectangle or ellipse via the vector-shape engine (filled or outline, constant/palette/autofill/lineart fill).
| Parameter | Type | Description |
|---|---|---|
region * | ||
shape * | string | |
autofillPaletteId | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
fillMode | string | |
filled | boolean | |
strokeWidth | number | |
style | ||
target |
draw_bezier
Bezier path (open stroke or closed shape) rasterized by the pen-tool engine. Coordinates are cell units (fractional allowed); handles are relative.
| Parameter | Type | Description |
|---|---|---|
points * | array | |
autofillPaletteId | string | |
closed | boolean | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
fillMode | string | |
filled | boolean | |
strokeTaperEnd | number | |
strokeTaperStart | number | |
strokeWidth | number | |
style | ||
target |
fill_area
Paint-bucket fill from a seed cell (contiguous or global, match by char/color/bgColor).
| Parameter | Type | Description |
|---|---|---|
x * | integer | |
y * | integer | |
contiguous | boolean | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
match | object | |
style | ||
target |
gradient_fill
Gradient fill (linear/radial) of a seed fill area or region, interpolating character, text color and/or background color stops.
| Parameter | Type | Description |
|---|---|---|
end * | ||
start * | ||
backgroundColor | ||
character | ||
contiguous | boolean | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
match | object | |
region | ||
seed | ||
target | ||
textColor | ||
type | string |
draw_ascii_box
Box-drawing rectangle or connected line path with junction-aware characters.
| Parameter | Type | Description |
|---|---|---|
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
path | array | Polyline vertices (horizontal/vertical/diagonal segments) |
region | ||
style | ||
styleId | string | Box style id (see get_catalog tools) |
target |
place_text
Type text at a position (text tool); newlines advance rows.
| Parameter | Type | Description |
|---|---|---|
text * | string | |
x * | integer | |
y * | integer | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
style | ||
target |
place_figlet_text
Render FIGlet ASCII-type text with a font/layout and stamp it at a position.
| Parameter | Type | Description |
|---|---|---|
text * | string | |
x * | integer | |
y * | integer | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
font | string | |
horizontalLayout | string | |
style | ||
target | ||
transparentWhitespace | boolean | |
verticalLayout | string |
app_add_layer
Add a content layer (with an empty content frame spanning the timeline).
| Parameter | Type | Description |
|---|---|---|
aboveLayerId | string | |
empty | boolean | Create without a content frame |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
name | string |
app_remove_layer
Delete a layer.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
app_duplicate_layer
Duplicate a layer with all content, keyframes and effects.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
reorder_layer
Move a layer to an index (0 = bottom of stack).
| Parameter | Type | Description |
|---|---|---|
layerId * | string | |
toIndex * | integer | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
update_layer
Update layer name, visibility, solo, lock, opacity, keyframe sync or static transform properties.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
locked | boolean | |
name | string | |
opacity | number | |
solo | boolean | |
staticProperties | object | Static transform values keyed by property path |
syncKeyframesToFrames | boolean | |
visible | boolean |
app_set_active_layer
Select the active (editable) layer.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
merge_layers
Merge a layer down, or merge all visible layers.
| Parameter | Type | Description |
|---|---|---|
mode * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
layerId | string |
flatten_layer
Bake transforms/effects of a layer into its content frames.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
app_create_group
Group layers.
| Parameter | Type | Description |
|---|---|---|
layerIds * | array | Two or more distinct layers not already in a group (the app has no empty groups) |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
name | string |
ungroup
Dissolve a group, keeping its layers.
| Parameter | Type | Description |
|---|---|---|
groupId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
update_group
Update group name, visibility, solo, lock, collapsed or static transform properties.
| Parameter | Type | Description |
|---|---|---|
groupId * | string | |
collapsed | boolean | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
locked | boolean | |
name | string | |
solo | boolean | |
staticProperties | object | |
visible | boolean |
app_add_content_frame
Add a content frame to a layer at an explicit time range (must not overlap).
| Parameter | Type | Description |
|---|---|---|
durationFrames * | integer | |
layerId * | string | |
startFrame * | integer | |
cells | array | |
copyFromContentFrameId | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
name | string |
app_remove_content_frame
Delete a content frame.
| Parameter | Type | Description |
|---|---|---|
contentFrameId * | string | |
layerId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
update_content_frame
Retime, rename, hide or label a content frame.
| Parameter | Type | Description |
|---|---|---|
contentFrameId * | string | |
layerId * | string | |
durationFrames | integer | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
hidden | boolean | |
labelColor | ||
name | string | |
startFrame | integer |
duplicate_content_frame
Duplicate a content frame immediately after itself (shifting later frames).
| Parameter | Type | Description |
|---|---|---|
contentFrameId * | string | |
layerId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
split_content_frame
Split a content frame at an absolute frame.
| Parameter | Type | Description |
|---|---|---|
atFrame * | integer | |
contentFrameId * | string | |
layerId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
set_timeline
Set frame rate, duration, looping and work area.
| Parameter | Type | Description |
|---|---|---|
durationFrames | integer | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
frameRate | integer | |
looping | boolean | |
maintainDuration | boolean | |
workArea |
trim_to_work_area
Trim the timeline to the enabled work area.
| Parameter | Type | Description |
|---|---|---|
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
remove_blank_space
Close an empty gap on a layer at a frame (ripple earlier content forward).
| Parameter | Type | Description |
|---|---|---|
frame * | integer | |
layerId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
seek
Move the playhead to an absolute frame.
| Parameter | Type | Description |
|---|---|---|
frame * | integer | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
set_playback
Start/stop preview playback in the browser.
| Parameter | Type | Description |
|---|---|---|
playing * | boolean | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
set_onion_skin
Configure onion skinning.
| Parameter | Type | Description |
|---|---|---|
allLayers | boolean | |
enabled | boolean | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
nextFrames | integer | |
previousFrames | integer |
set_keyframes
Upsert transform keyframes on a layer or group property track (creates the track).
| Parameter | Type | Description |
|---|---|---|
keyframes * | array | |
propertyPath * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
groupId | string | |
layerId | string | |
loop | boolean | |
replace | boolean | Replace all existing keyframes on the track |
remove_keyframes
Remove transform keyframes by frame or id, or clear the track.
| Parameter | Type | Description |
|---|---|---|
propertyPath * | string | |
clearTrack | boolean | Remove the whole property track |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
frames | array | Remove keyframes at these frames |
groupId | string | |
keyframeIds | array | |
layerId | string |
add_effect
Add a procedural effect block to a layer, group or global track.
| Parameter | Type | Description |
|---|---|---|
effectType * | string | |
owner * | ||
durationFrames | integer | |
enabled | boolean | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
settings | object | Effect settings keyed by property path (see get_catalog) |
startFrame | integer |
update_effect
Update effect settings, enabled state, timing, owner or stack index.
| Parameter | Type | Description |
|---|---|---|
blockId * | string | |
durationFrames | integer | |
enabled | boolean | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
index | integer | |
owner | ||
settings | object | Effect settings keyed by property path (see get_catalog) |
startFrame | integer |
remove_effect
Remove an effect block.
| Parameter | Type | Description |
|---|---|---|
blockId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
set_effect_keyframes
Upsert keyframes on an effect property.
| Parameter | Type | Description |
|---|---|---|
blockId * | string | |
keyframes * | array | |
propertyPath * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
replace | boolean | Replace all existing keyframes on the track |
remove_effect_keyframes
Remove effect keyframes.
| Parameter | Type | Description |
|---|---|---|
blockId * | string | |
propertyPath * | string | |
clearTrack | boolean | Remove the whole property track |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
frames | array | Remove keyframes at these frames |
keyframeIds | array |
bake_effect
Apply an effect destructively to layer content and remove the block.
| Parameter | Type | Description |
|---|---|---|
blockId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
add_shader
Add a shader (post-processing) block.
| Parameter | Type | Description |
|---|---|---|
shaderType * | string | |
durationFrames | integer | |
enabled | boolean | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
index | integer | |
settings | object | Effect settings keyed by property path (see get_catalog) |
startFrame | integer |
update_shader
Update shader settings, enabled state, timing or chain index.
| Parameter | Type | Description |
|---|---|---|
blockId * | string | |
durationFrames | integer | |
enabled | boolean | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
index | integer | |
settings | object | Effect settings keyed by property path (see get_catalog) |
startFrame | integer |
remove_shader
Remove a shader block.
| Parameter | Type | Description |
|---|---|---|
blockId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
set_shader_keyframes
Upsert keyframes on a shader property.
| Parameter | Type | Description |
|---|---|---|
blockId * | string | |
keyframes * | array | |
propertyPath * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
replace | boolean | Replace all existing keyframes on the track |
remove_shader_keyframes
Remove shader keyframes.
| Parameter | Type | Description |
|---|---|---|
blockId * | string | |
propertyPath * | string | |
clearTrack | boolean | Remove the whole property track |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
frames | array | Remove keyframes at these frames |
keyframeIds | array |
get_generator_catalog
Generator types with property schemas.
| Parameter | Type | Description |
|---|---|---|
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
app_add_generator_layer
Add a procedural generator layer, optionally with initial keyframe tracks (one undo entry). Returns layerId plus trackIds/keyframeIds in keyframes[] order.
| Parameter | Type | Description |
|---|---|---|
generatorType * | string | |
durationFrames | integer | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
keyframes | array | |
name | string | |
settings | object | |
startFrame | integer |
app_update_generator_layer
Update generator settings/timing/name/enabled.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | |
durationFrames | integer | |
enabled | boolean | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
name | string | |
settings | object | |
shiftKeyframes | boolean | |
startFrame | integer |
app_set_generator_property
Set one generator property (keyframes it when animated or frame given).
| Parameter | Type | Description |
|---|---|---|
layerId * | string | |
propertyPath * | string | |
value * | ||
applyEffectDefaults | boolean | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
frame | integer |
app_set_generator_keyframes
Upsert generator property keyframes.
| Parameter | Type | Description |
|---|---|---|
keyframes * | array | |
layerId * | string | |
propertyPath * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
loop | boolean | |
replace | boolean | Replace all existing keyframes on the track |
app_remove_generator_keyframes
Remove generator keyframes.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | |
propertyPath * | string | |
clearTrack | boolean | Remove the whole property track |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
frame | integer | |
frames | array | Remove keyframes at these frames |
keyframeIds | array |
app_reset_generator
Reset generator settings to defaults.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
app_randomize_generator_seed
Randomize generator seed.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
frame | integer |
get_generator_state
Generator source and evaluated settings at a frame.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
frame | integer |
app_render_generator_frames
Render generator output for frames (browser renderer).
| Parameter | Type | Description |
|---|---|---|
frames * | array | |
layerId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
includeCells | boolean |
app_bake_generator_layer
Bake generator output into content frames.
| Parameter | Type | Description |
|---|---|---|
layerId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
set_selection
Select a rectangle, explicit cells, a polygon (lasso) or all cells matching a color/char (magic wand).
| Parameter | Type | Description |
|---|---|---|
mode * | string | |
cells | array | |
combine | string | |
contiguousFrom | ||
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
match | object | |
polygon | array | |
region | ||
target |
app_clear_selection
Clear all selections.
| Parameter | Type | Description |
|---|---|---|
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
copy_selection
Copy (or cut) the selected cells of a content frame to the app clipboard. Copy without cut does not create history.
| Parameter | Type | Description |
|---|---|---|
cut | boolean | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
target |
paste_clipboard
Paste the app clipboard at a position (defaults to the original bounds).
| Parameter | Type | Description |
|---|---|---|
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
target | ||
transparent | boolean | |
x | integer | |
y | integer |
move_selection
Move selected cells by dx/dy (selection follows).
| Parameter | Type | Description |
|---|---|---|
dx * | integer | |
dy * | integer | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
target |
app_undo
Undo the last app history entry (same as Cmd/Ctrl+Z).
| Parameter | Type | Description |
|---|---|---|
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
app_redo
Redo (same as Cmd/Ctrl+Shift+Z).
| Parameter | Type | Description |
|---|---|---|
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
apply_operations
Apply up to 100 document mutations atomically: one revision, one undo entry, full rollback on any failure. Sub-operations must be non-nested document mutations (not undo/redo/new_project/load_project/apply_operations, reads, view, or io). Later steps see earlier steps' results; failures report details.index/details.op.
| Parameter | Type | Description |
|---|---|---|
operations * | array | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
set_active_palette
Activate a color or character palette.
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
paletteId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
create_palette
Create a custom color palette (colors) or character palette (characters).
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
name * | string | |
activate | boolean | |
characters | array | |
colors | array | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
update_palette
Rename a custom palette or replace its colors/characters.
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
paletteId * | string | |
characters | array | |
colors | array | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
name | string |
delete_palette
Delete a custom palette.
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
paletteId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
duplicate_palette
Duplicate any palette as a custom palette.
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
paletteId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
name | string |
import_palette
Import a palette from the app JSON palette format.
| Parameter | Type | Description |
|---|---|---|
data * | string | |
kind * | string | |
activate | boolean | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
export_palette
Export a palette as the app JSON palette file.
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
paletteId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
import_media
Convert an image/video (base64) to ASCII with the app import pipeline; place as a new layer or into a target content frame. Image-only overlay merges non-empty converted cells, preserving existing artwork elsewhere.
| Parameter | Type | Description |
|---|---|---|
data * | string | Base64 file bytes |
mimeType * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
filename | string | |
height | integer | |
matchFrameRate | boolean | |
mode | string | |
settings | object | Import settings overrides; allowed keys, enums and defaults: get_catalog tools.importSettings. Unsupported keys are rejected. |
target | ||
video | object | Video sampling window (video/* only). Omit to import every source frame. |
width | integer |
set_image_trace
Load/clear/configure the image-trace reference overlay (not saved in the project).
| Parameter | Type | Description |
|---|---|---|
clear | boolean | |
data | string | Base64 image/video bytes |
enabled | boolean | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
filename | string | |
fitToCanvas | boolean | |
frameOffset | integer | |
mimeType | string | |
opacity | number | |
position | ||
renderOrder | string | |
scale | number |
export
Render an export with the app exporters and return it as an artifact (no browser download). Allowed settings and defaults per format: get_catalog export_formats (unsupported keys are rejected). Animated formats accept frameRange "all" | {start,end} (end -1 = last); the result reports the exported frameRange and any derived componentName/packageName/modelName.
| Parameter | Type | Description |
|---|---|---|
format * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
filename | string | |
settings | object |
list_cloud_projects
List cloud projects (or trash).
| Parameter | Type | Description |
|---|---|---|
deleted | boolean | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
save_cloud_project
Save the open project to the cloud (update linked project, or create).
| Parameter | Type | Description |
|---|---|---|
description | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
name | string | |
saveAsNew | boolean |
open_cloud_project
Open a cloud project in the editor.
| Parameter | Type | Description |
|---|---|---|
projectId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
delete_cloud_project
Move a cloud project to trash.
| Parameter | Type | Description |
|---|---|---|
projectId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
restore_cloud_project
Restore a cloud project from trash.
| Parameter | Type | Description |
|---|---|---|
projectId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
permanently_delete_cloud_project
Permanently delete a trashed cloud project.
| Parameter | Type | Description |
|---|---|---|
projectId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
update_cloud_project_metadata
Rename or re-describe a cloud project.
| Parameter | Type | Description |
|---|---|---|
projectId * | string | |
description | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
name | string |
download_cloud_project
Download a cloud project as a .asciimtn artifact without opening it.
| Parameter | Type | Description |
|---|---|---|
projectId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
upload_session_to_cloud
Upload a native session as a new cloud project.
| Parameter | Type | Description |
|---|---|---|
session * | ||
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
filename | string |
publish_cloud_project
Publish a saved cloud project to the community gallery (preview rendered in browser).
| Parameter | Type | Description |
|---|---|---|
projectId * | string | |
title * | string | |
allowRemixes | boolean | |
description | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
tags | array |
remix_cloud_project
Remix a published gallery project into your cloud projects and open it.
| Parameter | Type | Description |
|---|---|---|
projectId * | string | |
expectedRevision | integer | Optional revision from an authoritative read; reject if the document changed before execution. |
read_artifact
Read bounded artifact pages. Text defaults to UTF-8; binary uses base64. Continue at nextOffset.
| Parameter | Type | Description |
|---|---|---|
artifactId * | string | |
encoding | string | |
length | integer | |
offset | integer |