Skip to main content
Glama
LufiSprite Studio

LufiSprite Studio

by Lufi735

clear_layer

Removes all pixels from a target 2D layer, resetting it to empty so you can redraw or start a layer over without deleting the layer itself.

Instructions

Clear all pixels on the target 2D layer.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "clear_layer"
  }
}

Input Schema

NameRequiredDescriptionDefault
layerIndexNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. "Clear all pixels" does disclose that the operation is destructive and whole-layer in scope, which is worth credit, but it says nothing about reversibility/undo, permission requirements, or what the tool returns. Since layerIndex is not required, the description also fails to explain which layer is cleared when no index is supplied.

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

Conciseness4/5

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

One tight sentence with the destructive scope front-loaded and no filler. It is arguably too terse for a mutation tool, but there is no wasted wording to trim.

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 an unannotated destructive mutation with no output schema and an entirely undocumented parameter, the description leaves key questions open: default layer when layerIndex is omitted, undo availability, and result shape. It covers the what but not the operational context an agent needs to call it safely.

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

Parameters2/5

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

Schema description coverage is 0% and the single parameter layerIndex is documented nowhere. The description mentions a "target 2D layer" but never states that layerIndex selects it, whether indices come from list_layers, or what the default target is given that the parameter is optional.

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 pairs a specific verb ("Clear") with a specific resource and scope ("all pixels on the target 2D layer"), which cleanly separates it from drawing siblings like draw_pixels, flood_fill, and update_layer. It does not explicitly name or contrast an alternative, but the operation itself is unambiguous.

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?

There is no when-to-use or when-not-to-use guidance, and no reference to any alternative such as flood_fill or update_layer. The phrase "target 2D layer" hints that the caller must be working against an existing layer, but no prerequisite or selection condition is stated.

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