Skip to main content
Glama

gimp_run_python

Destructive

Execute Python code in GIMP 3 to automate image edits, call GIMP/GEGL APIs, and persist variables between calls.

Instructions

Ejecuta código Python dentro de GIMP 3 (API GObject: Gimp, Gegl, Gio, GLib ya importados). Asigna la respuesta a la variable result (o usa print). Helpers disponibles: _img(id) imagen, _item(id) capa, _drawable(img, id) capa activa, _color('#hex'), _gegl(drawable, 'gegl:op', {props}), _pdb_run('proc', **args), _image_info(img), _undo(img). Las variables persisten entre llamadas.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already disclose destructiveHint=true, readOnlyHint=false, and openWorldHint=false, so the safety profile is covered. The description adds that variables persist between calls and that helpers exist, but does not elaborate on what code can destroy or permission requirements; with annotations present, a 3 is appropriate.

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?

Front-loaded with the core action and environment; the helper list is dense but each entry is functional. There is no redundant filler, though the helper list could be formatted more scannably.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, arbitrary-code-execution tool with no output schema, the description covers the execution environment and result handling but omits when to prefer this over specific GIMP tools, safety caveats about irreversible changes, and error behavior. Adequate but incomplete.

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 0% and the single 'code' parameter has no description in the schema. The description compensates by listing imported APIs, available helpers, the `result` assignment, and persistence, which meaningfully informs what the code string can contain. It still lacks syntax examples or constraints, so 4 rather than 5.

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 ('Ejecuta') and resource ('código Python') plus the execution environment and available helpers, clearly identifying it as an arbitrary scripting tool. It does not explicitly contrast with the many sibling tools (e.g., gimp_pdb_call), so a 4 rather than 5.

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

Usage Guidelines2/5

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

Provides no when-to-use or when-not-to-use guidance; it only lists environment details and helpers. The agent must infer that this is an escape hatch for operations not covered by dedicated tools.

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