import_layer
Adds a local image file as a layer to an open GIMP image at exact x/y and stack position while preserving original pixels, alpha, and dimensions. Returns layer ID, name, bounds, and image ID.
Instructions
Import an existing local asset as a layer into the owned, already open image.
Preserves the file's pixels/alpha and native dimensions. x/y are exact canvas pixel offsets; position is the top-to-bottom insertion index (0 means top). Does not open another image. Returns actual layer ID, name, bounds and image ID.
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": {
"file_path": "<file_path>"
},
"name": "import_layer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| name | No | ||
| position | No | ||
| file_path | Yes | ||
| image_index | No |