Skip to main content
Glama

draw_pixel

Draw a single pixel at specified coordinates with a chosen color in pixel art projects. Use this tool to place individual pixels for detailed editing, corrections, or precise artwork creation within animation frames and layers.

Instructions

Draw a single pixel

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject identifier
layerIndexNoLayer index (default: 0)
frameIndexNoFrame index (default: 0)
xYesX coordinate
yYesY coordinate
colorYesColor in hex format (e.g., "#FF0000" or "rgba(255,0,0,1)")

Implementation Reference

  • The PiskelServer method that acts as the handler for the 'draw_pixel' MCP tool, executing the core drawing logic.
    private drawPixelTool(
      projectId: string,
      layerIndex: number,
      frameIndex: number,
      x: number,
      y: number,
      color: string
    ): object {
      const frame = this.getFrame(projectId, layerIndex, frameIndex);
      const success = drawPixel(frame, x, y, color);
      return { success, x, y, color };
    }
  • The core drawing function that implements the pixel-setting logic, which is called by the handler.
    export function drawPixel(
      frame: Frame,
      x: number,
      y: number,
      color: number | string
    ): boolean {
      if (!frame.containsPixel(x, y)) {
        return false;
      }
      frame.setPixel(x, y, color);
      return true;
    }
  • The registration of the 'draw_pixel' tool in the PiskelServer, defining its name, description, and input schema.
    {
      name: 'draw_pixel',
      description: 'Draw a single pixel',
      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?

No annotations are provided, so the description carries full burden. 'Draw a single pixel' implies a write/mutation operation but doesn't disclose behavioral traits like whether it overwrites existing pixels, requires specific permissions, or has side effects. It lacks context on what 'draw' entails operationally.

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 and appropriately sized for the tool's complexity, making it easy to parse quickly.

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 mutation tool with 6 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what 'draw' does behaviorally, what happens on success/failure, or how it interacts with other tools. More context is needed given the complexity and lack of structured data.

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 fully documents all 6 parameters. The description adds no additional meaning beyond implying that parameters define where and how to draw the pixel, which is already covered by the schema. Baseline 3 is appropriate as the schema handles parameter semantics.

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 'Draw a single pixel' clearly states the action (draw) and resource (pixel), making the purpose immediately understandable. It distinguishes from siblings like draw_circle, draw_line, and draw_pixels by specifying a single pixel, though it doesn't explicitly contrast with these alternatives.

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 draw_pixels (for multiple pixels) or erase_pixel (for removal). It also doesn't mention prerequisites such as needing an existing project or layer, leaving usage context unclear.

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