Skip to main content
Glama

Delete layer

gimp_delete_layer
Destructive

Remove a layer or group and all child layers from a GIMP image. Deletion is destructive: pixels are lost unless undone in GIMP or reverted from a saved file.

Instructions

Remove a layer or a group with all its children. Destructive: the pixels are lost unless undone in GIMP or the image is reverted from a saved file. Ids of removed items become invalid.

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_delete_layer"
  }
}

Input Schema

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

Output Schema

NameRequiredDescriptionDefault
itemYes
deletedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and openWorldHint=false, yet the description adds real value beyond them: group deletion removes descendants, pixels are unrecoverable without an undo or revert, and removed item ids become invalid. It does not state permissions or what the (existing) output schema returns on success, but the key irreversible consequences are disclosed.

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 the action and scope, followed by the destructive consequence and the id-invalidation caveat. No redundant restatement of the tool name or schema.

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?

A one-parameter mutation tool with an output schema and full annotation coverage needs little more; the description covers scope, irreversibility, and post-state of ids. Minor gaps are the missing recovery-path pointer and the layer/group versus mask discrepancy for the item parameter.

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 100% and the single parameter is fully documented with id syntax, so the baseline 3 applies. The description adds that removed ids are invalidated afterwards, which is meaningful for this parameter, but it says "layer or a group" while the schema also lists masks, leaving a small ambiguity about accepted item types.

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 and resource ("Remove a layer or a group") and clarifies the cascading scope ("with all its children"), which distinguishes it from sibling operations like gimp_remove_layer_mask, gimp_duplicate_layer, or gimp_move_layer without needing schema inspection.

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 only implied by the destructive warning; there is no explicit statement of when to delete versus when to hide/mask or move a layer, and no mention of the available safety net (gimp_create_checkpoint / gimp_begin_undo_group) even though those siblings exist. Adequate but leaves the agent to infer the workflow.

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