8000 undo tool crashes: 'Image' object has no attribute 'undo' · Issue #42 · gimp-mcp/gimp-mcp · GitHub
[go: up one dir, main page]

Skip to content

undo tool crashes: 'Image' object has no attribute 'undo' #42

Open

Description

@Alexdmac

Description

Calling the undo MCP tool always fails with an AttributeError instead of undoing the last operation. (Suspect redo has the same bug, untested.)

Steps to reproduce

  1. Start the GIMP MCP server (Tools > MCP > Start MCP Server)
  2. Create/open any image and perform any edit, e.g. fill_layer(color="#4169E1")
  3. Call the undo tool

Expected

The last operation is undone.

Actual

Error executing tool undo: undo failed: 'Image' object has no attribute 'undo'

Likely cause

GIMP 3.2's PyGObject Gimp.Image object has no .undo() method. This should likely go through the PDB instead, e.g. the gimp-image-undo procedure (and gimp-image-redo for the redo tool):

pdb = Gimp.get_pdb()
proc = pdb.lookup_procedure("gimp-image-undo")
cfg = proc.create_config()
cfg.set_property("image", image)
proc.run(cfg)

Environment

  • GIMP: 3.2.4 (Windows 10)
  • gimp-mcp commit: 09bfb2d (2026-05-29)
  • Plugin installed per README Windows instructions into %APPDATA%\GIMP\3.2\plug-ins\gimp-mcp-plugin
  • MCP server: uv run gimp_mcp_server.py, connected via Claude Code over stdio

Activity

  1. removed
    documentationImprovements or additions to documentation
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0