remove_frame
Delete a specific animation frame from all layers in a pixel art project to edit sequences and manage animation timing.
Instructions
Remove a frame from all layers
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project identifier | |
| frameIndex | Yes | Index of the frame to remove |
Implementation Reference
- src/server/PiskelServer.ts:1006-1022 (handler)Handler method that implements the "remove_frame" tool logic.
private removeFrame(projectId: string, frameIndex: number): object { const piskel = this.getProject(projectId); if (frameIndex < 0 || frameIndex >= piskel.getFrameCount()) { throw new Error(`Frame index ${frameIndex} out of range`); } // Remove frame from all layers for (let i = 0; i < piskel.getLayerCount(); i++) { const layer = piskel.getLayerAt(i); if (layer) { layer.removeFrameAt(frameIndex); } } return { success: true, frameIndex }; } - src/server/PiskelServer.ts:202-218 (schema)MCP tool registration and input schema definition for "remove_frame".
name: 'remove_frame', description: 'Remove a frame from all layers', inputSchema: { type: 'object', properties: { projectId: { type: 'string', description: 'Project identifier', }, frameIndex: { type: 'number', description: 'Index of the frame to remove', }, }, required: ['projectId', 'frameIndex'], }, }, - src/server/PiskelServer.ts:742-746 (registration)Switch case in the tool execution handler that routes to the removeFrame implementation.
case 'remove_frame': return this.removeFrame( args.projectId as string, args.frameIndex as number );