Skip to main content
Glama

Edit text layer

gimp_set_text

Updates an existing text layer's content, font, size, color, alignment, spacing, box, or position in GIMP; only specified properties change, with one undo step.

Instructions

Change the text, font, size, color, justification, spacing, box or position of an existing text layer; only given properties change. Refused with WRONG_KIND on non-text layers and with FONT_NOT_FOUND (nothing changed) for unknown fonts. 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>"
    },
    "name": "gimp_set_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
fontNo
itemYesItem id (layer, group, mask...) e.g. 'item:5@a1b2c3d4'.
sizeNo
textNo
colorNosRGB color as '#rrggbb', '#rrggbbaa', '#rgb' or one of: white, black, red, green, blue, transparent
justifyNo
antialiasNo
box_widthNo
size_unitNo
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

A4.2/5.0
Behavior4/5

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

Annotations only declare the safe-mutation profile; the description adds real behavior: partial-update semantics ('only given properties change'), atomicity on failure ('nothing changed'), specific error codes, and undo granularity ('one undo step'). It doesn't cover prerequisites such as whether the item must be selected/active in the image.

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 tightly packed sentences with no filler; the core action and the partial-update rule are front-loaded before the error behavior and undo note.

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 14-parameter mutation tool with low schema coverage, the definition covers the main mutation semantics, failure modes, and undo impact; an output schema exists so return values need no explanation. Minor gaps are the unmentioned antialias flag and size_unit interplay.

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 14%, so the description must carry weight; it does enumerate the property groups (spacing → line/letter spacing, box → box width/height, position → x/y), but it leaves antialias unmentioned and gives no hints about size_unit coupling or color/unit formats beyond what the schema already states.

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?

States a specific verb (change) and resource (an existing text layer) and enumerates the editable facets: text, font, size, color, justification, spacing, box, position. 'Existing text layer' implicitly distinguishes it from the sibling create tool.

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

Usage Guidelines4/5

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

Makes clear the tool operates only on an existing text layer and documents refusal conditions (WRONG_KIND on non-text layers), which effectively tells the agent when not to call it. No alternatives are named outright (e.g. inspect_text to read, create_text_layer to make new), so it falls short of a 5.

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