Skip to main content
Glama

clear_frame

Remove all pixels from a specific animation frame in pixel art projects to reset or prepare for new artwork.

Instructions

Clear all pixels in a frame

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject identifier
layerIndexNoLayer index (default: 0)
frameIndexNoFrame index (default: 0)

Implementation Reference

  • The handler method that clears all pixels in a specific frame of a Piskel project.
    private clearFrameTool(
      projectId: string,
      layerIndex: number,
      frameIndex: number
    ): object {
      const piskel = this.getProject(projectId);
      const frame = this.getFrame(projectId, layerIndex, frameIndex);
      const width = piskel.getWidth();
      const height = piskel.getHeight();
    
      for (let y = 0; y < height; y++) {
        for (let x = 0; x < width; x++) {
          frame.setPixel(x, y, 0);
        }
      }
    
      return { success: true, pixelsCleared: width * height };
  • Registration of the 'clear_frame' tool, including its schema definition.
    name: 'clear_frame',
    description: 'Clear all pixels in a frame',
    inputSchema: {
      type: 'object',
      properties: {
        projectId: {
          type: 'string',
          description: 'Project identifier',
        },
        layerIndex: {
          type: 'number',
          description: 'Layer index (default: 0)',
        },
        frameIndex: {
          type: 'number',
          description: 'Frame index (default: 0)',
        },
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose whether this is destructive (likely yes, but not stated), whether it requires specific permissions, what happens to transparency/alpha channels, or what the visual outcome looks like. For a pixel modification tool with zero annotation coverage, this is insufficient behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's front-loaded with the core action and immediately communicates the essential purpose without unnecessary elaboration. This is model conciseness for a straightforward operation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that modifies visual data with 3 parameters and no annotations or output schema, the description is too minimal. It doesn't explain what 'clear' means technically (set to transparent? set to black?), doesn't mention coordinate systems or bounds, and provides no information about return values or side effects. The context demands more completeness than provided.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters adequately. The description doesn't add any parameter-specific context beyond what's in the schema (like explaining coordinate systems, layer/frame hierarchy, or default behavior implications). Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Clear all pixels') and target resource ('in a frame'), making the purpose immediately understandable. It doesn't distinguish from siblings like 'erase_pixel' or 'fill_area' which also modify pixel data, but the verb+resource combination is specific enough for basic understanding.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'erase_pixel' (for selective clearing) or 'fill_area' (for clearing with color). There's no mention of prerequisites, typical workflows, or contextual constraints that would help an agent choose appropriately among sibling drawing/modification tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yafeiaa/piskel-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server