Skip to main content
Glama
gimp-mcp-studio
by Onru-Labs

get_image_bitmap

Retrieve the current image open in GIMP as an Image object, with optional scaling or region extraction for targeted processing.

Instructions

Get the current open image in GIMP as an Image object with optional scaling and region selection.

No size restrictions — pass any max_width/max_height you need. For large images, omit max_width/max_height to get the full resolution.

Supports two main use cases:

  1. Full image with optional scaling (pass max_width/max_height)

  2. Region extraction with optional scaling (pass region dict)

Parameters:

  • max_width, max_height: Target dimensions for scaling (aspect-ratio preserved). Omit for full resolution.

  • region: Dictionary with keys:

    • origin_x, origin_y: Top-left corner of region to extract

    • width, height: Dimensions of region to extract

    • max_width, max_height: Optional scaling for the extracted region

Examples:

  • Full image at full res: get_image_bitmap()

  • Full image scaled: get_image_bitmap(max_width=2048, max_height=2048)

  • Region: get_image_bitmap(region={"origin_x": 0, "origin_y": 0, "width": 512, "height": 512})

Returns:

  • Image object containing PNG data in MCP-compliant format

  • Includes width, height, and base64-encoded image data

The returned Image object automatically handles base64 encoding and MIME types according to the Model Context Protocol specification.

Raises:

  • RuntimeError if no image is open, region is invalid, or export fails

Input Schema

NameRequiredDescriptionDefault
regionNo
max_widthNo
max_heightNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does well: it discloses the return format (PNG, base64, MIME type per MCP spec), states there are no size restrictions, and enumerates failure conditions ('RuntimeError if no image is open, region is invalid, or export fails'). It stops short of stating performance/resource implications of full-resolution export on very large images, which an agent planning calls would benefit from.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well front-loaded with the core action first, then use cases, parameters, examples, returns, and raises. The examples and returns sections earn their place given the absent output schema, though the two closing sentences about automatic base64/MIME handling restate the same point twice.

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?

For a 3-parameter, zero-annotation, no-output-schema tool with 0% schema description coverage, the description supplies everything needed: object shape, nested region keys, scaling semantics, concrete call examples, return payload contents, and error conditions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, and the description fully compensates: it defines max_width/max_height as target dimensions with aspect ratio preserved, and unpacks the untyped region dict into origin_x, origin_y, width, height plus optional nested max_width/max_height. This is meaning the schema literally cannot convey, since region is only an open object type.

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+resource ('Get the current open image in GIMP as an Image object') plus the two capabilities (scaling, region selection). It is clearly distinguishable from siblings like get_image_metadata (metadata only) and export_image (writes to disk) without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit usage scenarios ('Full image with optional scaling' vs 'Region extraction') and a sizing hint ('For large images, omit max_width/max_height'). It does not explicitly say when to prefer this over siblings such as get_image_metadata, export_image, or get_pixel_color, so routing guidance is implied rather than stated.

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