Skip to main content
Glama

Create layer

gimp_create_layer

Adds a new raster layer with alpha to a GIMP image at a specified parent and position, using pixel dimensions, offsets, fill color, opacity, visibility, and layer mode in one undo step.

Instructions

Add a new raster layer (with alpha) to an image, at an explicit parent and position. Size and offset are in image pixels (default: the image size at 0,0). fill: 'transparent' or a color. 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": {
      "image": "<image>",
      "name": "<name>"
    },
    "name": "gimp_create_layer"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
fillNosRGB color as '#rrggbb', '#rrggbbaa', '#rgb' or one of: white, black, red, green, blue, transparenttransparent
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.normal
nameYes
imageYesImage id from gimp_status, e.g. 'image:1@a1b2c3d4'.
widthNo
heightNo
parentNoGroup id to put the layer in; null for the top level of the image.
opacityNo0 (transparent) - 100 (opaque).
visibleNo
positionNoIndex within the parent, 0 = top-most (in front).

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

B3.4/5.0
Behavior3/5

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

Annotations already declare a non-read-only, non-destructive, closed-world mutation. The description adds real value beyond that with "One undo step" (reversibility) and the alpha-channel guarantee, but says nothing about failure modes, name collisions, or permission/selection requirements.

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?

Three short sentences, front-loaded with what is created and where, then defaults, then the undo note. Every clause carries information; nothing is redundant or restated from the title.

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 12-parameter creation tool with an output schema and annotations present, the description covers the essential creation semantics, placement, sizing, and undo consequences. Minor gaps remain around naming and visibility behavior, but no critical calling information is missing.

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?

With 50% schema coverage across 12 parameters, the description earns credit for supplying units ("Size and offset are in image pixels"), the default-size-at-origin behavior, and the fill values. However it leaves name, mode, opacity, and visible entirely to the schema, so it only partly compensates for the coverage gap.

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?

"Add a new raster layer (with alpha) to an image" gives a specific verb and resource, and "raster" plus "with alpha" implicitly separates it from gimp_create_text_layer and gimp_create_group. It does not name those siblings outright, so the differentiation is inferred rather than stated.

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 never says when to reach for this tool versus gimp_create_text_layer, gimp_create_group, or gimp_import_layer, and gives no prerequisites or exclusions. The only implied guidance is "at an explicit parent and position", which hints at group placement but does not route the agent.

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