Skip to main content
Glama

Clear layer

clear_layer

Erase a layer completely, or only within the active selection, to remove unwanted content before repainting or resetting that layer.

Instructions

Erase a layer completely (or just inside the selection).

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
layerNoLayer id, name, or index (0 = bottom, -1 = top). Default: the active layer.
targetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It does convey the key destructive facts — pixels are erased, and the selection bounds the erasure so off-selection content survives — but it omits whether the layer object is retained, whether the action is undoable, and how the mask target behaves.

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?

Nine words, front-loaded with the verb and resource, no filler. Slight deduction because the parenthetical 'or just inside the selection' is cryptic for a reader who does not already know what 'the selection' refers to, and the brevity under-serves a destructive tool.

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?

The tool is structurally simple (2 optional params, no output schema), but it has zero annotations and half its parameters are undescribed. For a destructive operation whose mask variant is completely unexplained, the description does not provide enough for confident invocation.

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 coverage is 50%: 'layer' is documented (id/name/index, default active), but 'target' has an empty schema description and is never mentioned in the description. The meaning of clearing a mask versus a layer's pixels — the central ambiguity of this tool — is entirely undocumented.

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?

States a specific verb and resource ('Erase a layer'), plus the scope modifier that contents are removed either entirely or only within the selection. An agent knows the operation, but nothing distinguishes it from the sibling 'delete_layer' — whether the layer object survives as an empty layer is left unresolved.

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 parenthetical about the selection describes a conditional behavior, not when to choose this tool. There is no guidance on picking clear_layer over delete_layer, fill, or layer_mask, and no prerequisites for a destructive operation are given.

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