Skip to main content
Glama

Draw line / polyline

gimp_draw_path
Destructive

Draws a solid polyline through pixel coordinates on a GIMP item, with configurable width, color, opacity, caps, joins, and optional closure; clips outside points and records one undo step.

Instructions

Stroke a polyline through points [[x, y], ...] (image pixels, at least 2 points) with a plain line of the given width, color and opacity; closed=true joins the last point to the first. Uses a solid line, never the user's brush. Points outside the layer are clipped. 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>",
      "points": "<points>",
      "color": "<color>"
    },
    "name": "gimp_draw_path"
  }
}

Input Schema

NameRequiredDescriptionDefault
capNoround
itemYesItem id (layer, group, mask...) e.g. 'item:5@a1b2c3d4'.
joinNoround
colorYessRGB color as '#rrggbb', '#rrggbbaa', '#rgb' or one of: white, black, red, green, blue, transparent
widthNoLine width in pixels.
closedNo
pointsYes
opacityNo0-100.
antialiasNo

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?

Adds real behavior beyond the annotations: 'One undo step' tells the agent the mutation is atomic and reversible in one history entry, and 'Points outside the layer are clipped' warns that coordinates may silently disappear. 'Uses a solid line, never the user's brush' clarifies output predictability. It stops short of stating that existing pixels under the stroke are overwritten, which the destructiveHint already implies.

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?

Two compact sentences, front-loaded with the verb and resource, then the non-obvious constraints (brush, clipping, undo). No filler, no repetition of schema defaults.

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?

For a 9-parameter destructive drawing tool with an output schema, this covers the operation, clipping, undo granularity and rendering style. The remaining gap is that it never says what 'item' targets (layer vs mask vs group) in relation to where the stroke lands, which for a clipping-sensitive operation would help.

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?

At 44% schema coverage the description has to carry meaning, and it does for the important parts: it fixes the points format as [[x, y], ...], declares the coordinate space ('image pixels'), states the minimum of 2 points, and explains that closed=true joins last to first — none of which the schema says. It leaves item, cap, join and antialias unmentioned, but those are largely self-describing enums with defaults.

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?

Uses a specific verb+resource ('Stroke a polyline through points') and pins the geometry, width, color and opacity up front. It behaviorally separates itself from brush-based painting ('never the user's brush') but never names the nearest sibling, gimp_draw_shape, so the agent must infer which drawing tool to pick.

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 only implied by the drawing semantics; there is no explicit 'use this when…' or 'use gimp_draw_shape instead when…' statement. An agent can reasonably infer the tool is for straight-line/polyline strokes, but the choice against sibling drawing and fill tools is left to inference.

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