Skip to main content
Glama

Export PNG/JPEG

gimp_export_image
Destructive

Export the visible composite of an image to PNG or JPEG, optionally overwriting existing files without modifying the source image.

Instructions

Export the visible composite of the image to PNG or JPEG (format from the extension). The image itself is not modified. Existing files are only replaced when overwrite=true. Defaults: PNG compression 9, not interlaced; JPEG quality 90, baseline, optimized, transparency flattened on white.

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>",
      "path": "<path>"
    },
    "name": "gimp_export_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path ending in .png, .jpg or .jpeg.
imageYesImage id from gimp_status, e.g. 'image:1@a1b2c3d4'.
formatNo
overwriteNo
png_optionsNo
jpeg_optionsNo

Output Schema

NameRequiredDescriptionDefault
pathYes
bytesYes
imageYes
widthYes
formatYes
heightYes
optionsYesEffective encoder options.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.6.0
    • addedInput schema / $defs / JpegOptions / properties / color_profile
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Embed the color profile (ICC); default: only when the image has one assigned.",
      +  "title": "Color Profile"
      +}
    • addedInput schema / $defs / JpegOptions / properties / metadata
      Added value: +{
      +  "description": "Metadata to write (none by default: nothing leaks unless asked).",
      +  "items": {
      +    "enum": [
      +      "exif",
      +      "xmp",
      +      "iptc",
      +      "comment",
      +      "thumbnail"
      +    ],
      +    "type": "string"
      +  },
      +  "title": "Metadata",
      +  "type": "array"
      +}
    • addedInput schema / $defs / PngOptions / properties / color_profile
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Embed the color profile (iCCP); default: only when the image has one assigned.",
      +  "title": "Color Profile"
      +}
    • addedInput schema / $defs / PngOptions / properties / metadata
      Added value: +{
      +  "description": "Metadata to write (none by default: nothing leaks unless asked).",
      +  "items": {
      +    "enum": [
      +      "exif",
      +      "xmp",
      +      "iptc",
      +      "comment",
      +      "thumbnail"
      +    ],
      +    "type": "string"
      +  },
      +  "title": "Metadata",
      +  "type": "array"
      +}
  2. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

The description adds real context beyond the annotations: despite destructiveHint=true, the source image is explicitly untouched and on-disk files are only replaced when overwrite=true, which bounds the blast radius. It also discloses default encoding behavior (compression 9, non-interlaced, quality 90, baseline, optimized, transparency flattened on white) that annotations cannot convey.

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 tight sentences, front-loaded with the core action and effect, then the overwrite safety condition, then format defaults. No filler, and each sentence carries information an agent would otherwise have to guess.

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?

With an output schema present, return values need no explanation, and the description covers the remaining decision points: format inference, overwrite gating, non-mutation of the source, and per-format default quality/compression. Nothing essential to calling it correctly is missing.

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

Parameters4/5

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

Schema coverage is only 33%, so the description must compensate, and it does: it explains that format is derived from the file extension and summarizes the effective defaults of the nested png_options and jpeg_options objects. It does not restate the path/image parameters, but those are the two that the schema documents well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (export) and resource (the visible composite) plus the target formats and how the format is determined. It is clearly distinct from a native save, though it never names the sibling gimp_save_image, so an agent must infer that boundary.

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 implied rather than stated: 'visible composite' and 'the image itself is not modified' signal this is a flattening output step rather than an editable save, and overwrite=true signals replacement semantics. There is no explicit when-to-use versus gimp_save_image, and no note on what happens when the target exists with overwrite=false.

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