Skip to main content
Glama

Set layer properties

gimp_set_layer_properties

Rename a GIMP layer or group and change its visibility, opacity, blend mode, or locks without altering pixels. Applies only specified properties and creates one undo step.

Instructions

Rename a layer or group and/or change its visibility, opacity (0-100), blend mode or locks (content, position, visibility, alpha). Only the given properties change. Not destructive: pixels are untouched. One undo step.

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>"
    },
    "name": "gimp_set_layer_properties"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemYesItem id (layer, group, mask...) e.g. 'item:5@a1b2c3d4'.
modeNoGIMP layer mode nick, e.g. normal, multiply, screen, overlay, soft-light, hard-light, addition, subtract, difference, darken-only, lighten-only, hue, saturation, color, dodge, burn, pass-through (groups). Invalid names are refused with the list of allowed ones.
nameNo
opacityNo
visibleNo
lock_alphaNo
lock_contentNo
lock_positionNo
lock_visibilityNo

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

A4.1/5.0
Behavior4/5

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

Goes beyond the annotations by declaring partial-update semantics ('Only the given properties change'), non-destructiveness at the pixel level, and that the whole call collapses into a single undo step. The annotations already flag destructiveHint=false, so the description's added nuance about pixels and undo is genuine incremental value. It does not mention permission or error behavior for locked layers, which would have pushed it higher.

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?

Three dense sentences with no filler, and the core action leads. The 'and/or' construction is slightly awkward but conveys optionality efficiently. Nothing is repeated from annotations or schema verbatim.

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?

For a 9-parameter mutation tool this covers the essentials: what changes, that unchanged properties are preserved, that pixels are safe, and undo behavior. An output schema exists, so return values need not be described. The main gap is that it never clarifies that 'item' may be a mask or other object type and how that interacts with locks like lock_alpha.

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

Parameters4/5

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

Schema coverage is only 22%, so the description carries most of the burden and largely meets it: it names opacity's 0-100 range, the four specific lock flags, visibility, name, and blend mode. The blend-mode nick list and the 'invalid names are refused' behavior live in the schema rather than the description, and the 'item' argument's accepted object types are left to the schema, so it is not fully compensating.

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

Purpose5/5

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

States a concrete verb (rename/change) with the exact resource (layer or group) and enumerates every mutable property: visibility, opacity, blend mode, and the four locks. An agent can distinguish it from gimp_set_layer_mask, gimp_set_layer_offsets, or gimp_set_text without opening any schema.

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?

Usage is implied by the enumerated property list rather than stated explicitly. There is no when-to-use/when-not guidance and no reference to sibling tools such as gimp_set_text for text content or gimp_delete_layer for removal. The 'Only the given properties change' clause does tell the agent this is a partial update, which is a useful selection signal.

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