Skip to main content
Glama

End undo group

gimp_end_undo_group

Closes the innermost undo group this client opened on a specified GIMP image, returning NO_OPEN_GROUP if no matching group is open.

Instructions

Close the innermost undo group this client opened on the image (NO_OPEN_GROUP otherwise).

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": "gimp_end_undo_group"
  }
}

Input Schema

NameRequiredDescriptionDefault
imageYesImage id from gimp_status, e.g. 'image:1@a1b2c3d4'.

Output Schema

NameRequiredDescriptionDefault
depthYesUndo groups this client still has open on the image (0 = none).
imageYes

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 declare a non-read-only, non-destructive, closed-world operation, so safety is already covered. The description adds genuine behavioral context beyond that: client-scoped group ownership and the specific NO_OPEN_GROUP error case. It does not say what closing the group does to the recorded operations (e.g., collapsing them into a single undo step), which would have pushed this higher.

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?

One sentence, front-loaded with the action and resource, with the error caveat parenthesized at the end. Nothing is wasted and nothing important is buried.

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 one-parameter tool with an output schema and full annotation coverage, the description covers purpose, scope, and the main failure mode. The only missing piece is the requirement to precede it with gimp_begin_undo_group and the effect on the recorded undo history.

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 'image' parameter is fully documented with an id format in the schema. The description adds no parameter-level meaning, so the baseline 3 applies.

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 ('Close the innermost undo group'), scopes it to the group 'this client opened', and names the failure result (NO_OPEN_GROUP). The pairing with the sibling gimp_begin_undo_group is unmistakable without opening either 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?

The 'this client opened' clause plus the NO_OPEN_GROUP condition implies the tool must follow gimp_begin_undo_group, but the description never says so explicitly and names no alternative action. Guidance is inferable rather than stated.

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