Skip to main content
Glama

Import file as layer

gimp_import_layer

Import an image file as a new layer in an existing GIMP image at specified coordinates or into a layer group; multi-layer source files are flattened into one layer.

Instructions

Load an image file (PNG, JPEG, XCF... absolute path) as a new layer of an existing image. Multi-layer files are flattened into one layer. Placed at x,y (default 0,0); name defaults to the file name. 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>",
      "path": "<path>"
    },
    "name": "gimp_import_layer"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
nameNo
pathYesAbsolute path of the file to import.
imageYesImage id from gimp_status, e.g. 'image:1@a1b2c3d4'.
parentNoGroup id to put the layer in; null for the top level of the image.
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

A4.1/5.0
Behavior4/5

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

Annotations already declare a non-destructive write, and the description adds genuinely new behavioral context: multi-layer source files are flattened into a single layer, and the operation costs exactly one undo step. Remaining gaps (failure modes for bad paths, coordinate origin) are minor.

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?

Four tight clauses, all front-loaded, each carrying distinct information (formats/path, flattening, placement defaults, undo cost) with no filler.

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

Completeness5/5

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

With an output schema covering return values and annotations covering the safety profile, the description supplies the remaining essentials an agent needs: accepted formats, absolute-path requirement, source-image prerequisite, flattening behavior, and undo semantics.

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 57%, with path, image, parent, and position already documented. The description restates the x/y defaults already present in the schema but does add one useful rule beyond it: that a null name falls back to the file name. It says nothing about parent/position mechanics.

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 specific verb and resource ('Load an image file ... as a new layer of an existing image') plus accepted formats, which cleanly separates it from siblings like gimp_create_layer (blank layer) or gimp_create_text_layer.

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 'as a new layer of an existing image' and by the required image id, but the description never explicitly states when to choose this over gimp_create_layer or gimp_duplicate_layer, nor any prerequisite for the target image.

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