Skip to main content
Glama

Remove layer mask

gimp_remove_layer_mask
Destructive

Remove a layer mask from a GIMP layer: apply it to alpha so hidden pixels become transparent, or discard it to show the layer unmasked.

Instructions

Remove a layer's mask. mode='apply' bakes it into the layer's alpha (destructive: hidden pixels become transparent); mode='discard' drops it (the layer is shown unmasked).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "item": "<item>",
      "mode": "<mode>"
    },
    "name": "gimp_remove_layer_mask"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemYesItem id (layer, group, mask...) e.g. 'item:5@a1b2c3d4'.
modeYes

Output Schema

NameRequiredDescriptionDefault
xYesOffset of the layer's top-left corner in image pixels.
yYes
idYes
kindYes
maskYes
modeYesGIMP layer mode nick, e.g. 'normal', 'multiply'.
nameYesLayer name. GIMP keeps names unique within an image ('Title #1').
locksYes
widthYes
heightYes
parentYesId of the parent group, null at the top level.
opacityYes0-100.
visibleYes
childrenNoChild layers of a group, top-most first; null for non-groups.
has_alphaYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.6.0
    • changedOutput schema / $defs / LayerNode / properties / kind / enum
      Previous value: -[
      -  "layer",
      -  "group",
      -  "text"
      -]New value: +[
      +  "layer",
      +  "group",
      +  "text",
      +  "vector",
      +  "link"
      +]
    • changedOutput schema / properties / kind / enum
      Previous value: -[
      -  "layer",
      -  "group",
      -  "text"
      -]New value: +[
      +  "layer",
      +  "group",
      +  "text",
      +  "vector",
      +  "link"
      +]
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds substantive detail: 'apply' bakes the mask into alpha and turns hidden pixels transparent, while 'discard' shows the layer unmasked. That explains the concrete consequence of each destructive path, which is more than the annotations convey.

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?

A single front-loaded sentence states the action, followed by a compact mode breakdown with the destructive case flagged inline. No filler, and the most important consequence is surfaced immediately.

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

Completeness4/5

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

With an output schema present, return values need not be described, and the destructive semantics are covered. The one remaining ambiguity is whether 'item' expects the layer or the mask id, which the schema's generic 'Item id (layer, group, mask...)' wording does not resolve.

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 coverage is 50%: 'item' is documented in the schema, while 'mode' has only an enum with no schema description. The description compensates well for that gap by spelling out what 'apply' and 'discard' actually do, but it adds nothing about what 'item' should reference (the layer vs. the mask itself).

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 ('Remove a layer's mask') and describes the two outcomes, so the agent knows exactly what operation is performed. It does not explicitly distinguish itself from the sibling gimp_set_layer_mask, which likely toggles mask enablement, leaving that differentiation to inference.

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

Usage Guidelines3/5

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

The two modes are explained in terms of effect, which implicitly guides the agent to choose 'apply' when it wants pixels baked in and 'discard' when it wants the mask dropped. There is no explicit when-to-use versus alternatives (e.g. gimp_set_layer_mask to merely disable instead of remove), and no prerequisite or context requirements stated.

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