Skip to main content
Glama

Create text layer

gimp_create_text_layer

Add an editable text layer to a GIMP image at a chosen position and size, with optional fixed box wrapping; text remains editable and uses one undo step.

Instructions

Add an editable text layer. Position (x, y) is the top-left corner in image pixels. size is in size_unit ('px' or 'pt'). Without box_width/box_height the layer grows with the text; with both, the text wraps in a fixed box. The text stays editable (never rasterized). 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": {
      "image": "<image>",
      "text": "<text>"
    },
    "name": "gimp_create_text_layer"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
fontNoSans-serif
sizeNoFont size, in size_unit.
textYes
colorNosRGB color as '#rrggbb', '#rrggbbaa', '#rgb' or one of: white, black, red, green, blue, transparent#000000
imageYesImage id from gimp_status, e.g. 'image:1@a1b2c3d4'.
parentNoGroup id to put the layer in; null for the top level of the image.
justifyNoleft
positionNoIndex within the parent, 0 = top-most (in front).
antialiasNo
box_widthNo
size_unitNopx
box_heightNo
line_spacingNo
letter_spacingNo

Output Schema

NameRequiredDescriptionDefault
xYesOffset of the layer's top-left corner in image pixels.
yYes
idYes
kindYes
maskYes
modeYesGIMP layer mode nick, e.g. 'normal', 'multiply'.
nameYesLayer name. GIMP keeps names unique within an image ('Title #1').
locksYes
widthYes
heightYes
parentYesId of the parent group, null at the top level.
opacityYes0-100.
visibleYes
childrenNoChild layers of a group, top-most first; null for non-groups.
has_alphaYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.6.0
    • changedOutput schema / $defs / LayerNode / properties / kind / enum
      Previous value: -[
      -  "layer",
      -  "group",
      -  "text"
      -]New value: +[
      +  "layer",
      +  "group",
      +  "text",
      +  "vector",
      +  "link"
      +]
    • changedOutput schema / properties / kind / enum
      Previous value: -[
      -  "layer",
      -  "group",
      -  "text"
      -]New value: +[
      +  "layer",
      +  "group",
      +  "text",
      +  "vector",
      +  "link"
      +]
  2. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the annotations (which only declare non-read-only, non-destructive, closed-world), the description adds real behavioral facts: text is never rasterized, box parameters switch between auto-sizing and fixed wrapped box, and it costs exactly one undo step. That is meaningful disclosure for a mutation tool, though it omits things like required permissions or what happens on out-of-bounds coordinates.

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?

Five short sentences, each carrying distinct information: purpose, coordinate semantics, size unit, box behavior, editability, and undo cost. The core purpose is front-loaded and there is no filler.

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?

An output schema exists, so return values need no explanation, but for a 16-parameter construction tool the description leaves a large share of parameters (styling, parent/positioning, spacing) undocumented and offers no guidance relative to sibling text/layer tools. It is adequate to call the tool in the simple case but not complete for its full surface.

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 coverage is only 31% across 16 parameters, so the description must compensate and only partly does: it clarifies x/y origin semantics, size units, and the box_width/box_height interaction. It says nothing about font, color, justify, parent, position, antialias, line_spacing, or letter_spacing, leaving many parameters with no semantic detail anywhere.

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?

The first sentence states a specific verb and resource ('Add an editable text layer'), which is clearly distinct from a generic layer-creation sibling. It does not explicitly name how it differs from gimp_create_layer or gimp_set_text, but the resource and the 'editable' qualifier make the intent unambiguous.

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: an agent can infer this is the tool for adding text, but there is no explicit guidance on when to use this versus gimp_create_layer or gimp_set_text, nor any preconditions (e.g., image must already exist). It provides context but no exclusions or alternatives.

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