Skip to main content
Glama

Draw rectangle / ellipse

gimp_draw_shape
Destructive

Draw a rectangle or ellipse on a GIMP layer with fill and/or stroke colors, leaving the selection unchanged in a single undo step.

Instructions

Draw a rectangle or an ellipse (inscribed in x, y, width, height) on a layer, filled with fill_color and/or outlined with stroke_color (stroke centered on the outline). The image's selection is left unchanged. One undo step.

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": {
      "item": "<item>",
      "shape": "<shape>",
      "x": "<x>",
      "y": "<y>",
      "width": "<width>",
      "height": "<height>"
    },
    "name": "gimp_draw_shape"
  }
}

Input Schema

NameRequiredDescriptionDefault
xYes
yYes
itemYesItem id (layer, group, mask...) e.g. 'item:5@a1b2c3d4'.
shapeYes
widthYes
heightYes
opacityNo0-100.
antialiasNo
fill_colorNosRGB color as '#rrggbb', '#rrggbbaa', '#rgb' or one of: white, black, red, green, blue, transparent
stroke_colorNosRGB color as '#rrggbb', '#rrggbbaa', '#rgb' or one of: white, black, red, green, blue, transparent
stroke_widthNoLine width in pixels.

Output Schema

NameRequiredDescriptionDefault
itemYes
changedYesFalse when the painted area does not intersect the layer.
affectedYesImage-space box of the pixels that may have changed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnly=false, so the safety profile is covered; the description adds genuinely new behavior: the image selection is left unchanged, and the operation consumes exactly one undo step, which matters for undo-group planning. It still omits what happens when the shape extends past canvas bounds, how it behaves on a group or mask item, and how opacity interacts with fill.

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?

Two tight sentences, front-loaded with the action and geometry, and every clause carries meaning (inscription rule, stroke centering, selection untouched, undo cost). Slightly dense parenthetical embedding is the only cost.

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?

An output schema exists, so return values need no explanation, and the destructive nature is covered by annotations plus the undo-step note. For an 11-parameter pixel mutation, the missing pieces are how antialias/opacity/stroke_width combine and whether drawing outside the layer bounds is clipped, which leaves a modest gap rather than an inadequate definition.

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 description coverage is only 45% across 11 parameters, so the description has to carry weight; it clarifies the geometry ('inscribed in x, y, width, height'), the fill/stroke duality, and notably that the stroke is centered on the outline. It says nothing about opacity, antialias, stroke_width default, or what kinds of objects 'item' accepts (the layer/group/mask nuance lives only in the schema). Useful additions, but not enough to compensate for the coverage gap.

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?

Specific verb (Draw) plus the two exact resources (rectangle, ellipse), the geometry convention ('inscribed in x, y, width, height'), the target ('on a layer') and the paint modes (fill and/or stroke). 'The image's selection is left unchanged' implicitly separates it from gimp_select_rectangle and gimp_select_ellipse, so an agent can rule those out without opening a 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?

Context of use is implied by 'on a layer' and by the fill/stroke framing, but there is no explicit when-to-use or when-not guidance, and no mention of gimp_fill, gimp_draw_path, or the selection siblings as alternatives. The selection note nudges toward the right choice but does not state a rule.

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