Skip to main content
Glama

Rotate layer

gimp_rotate_layer
Destructive

Rotate a GIMP layer or group clockwise around its center, choosing clipped bounds or expanded bounds to keep all pixels.

Instructions

Rotate a layer or group by angle degrees (clockwise) around its center. clip='adjust' grows the layer to keep all pixels, 'clip' keeps the original bounds. Multiples of 90 are lossless with interpolation 'none'; other angles resample. 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>",
      "angle": "<angle>"
    },
    "name": "gimp_rotate_layer"
  }
}

Input Schema

NameRequiredDescriptionDefault
clipNoadjust
itemYesItem id (layer, group, mask...) e.g. 'item:5@a1b2c3d4'.
angleYesDegrees, clockwise.
interpolationNoResampling: none (nearest neighbour, hard edges), linear, cubic, nohalo, lohalo.cubic

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 already flag destructiveHint=true and readOnlyHint=false, but the description adds real substance: clip='adjust' grows the layer while 'clip' keeps original bounds (implying pixel loss), non-90 angles resample while 90-multiples with 'none' are lossless, and the operation is a single undo step. That is exactly the kind of consequence an agent needs before invoking a destructive transform.

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?

Three tight sentences, front-loaded with the core action and then the parameter tradeoffs. No filler, and every clause carries information the agent needs.

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?

Output schema exists, so return values need not be explained. The description covers the destructive nature, the clipping tradeoff, quality implications, and undo behavior. Minor gaps remain around rotating masks or groups with differing bounds, but nothing essential to a correct call is missing.

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 75%, and the description still adds meaning beyond it: it explains the effect of each clip enum value in terms of resulting layer bounds, and ties interpolation choice to angle multiples to explain lossless versus resampled outcomes. Only the 'item' parameter's accepted id forms are left to the schema, which already documents them.

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 and resource (rotate a layer or group), the axis (around its center), and the unit/direction (angle degrees, clockwise). This clearly separates it from siblings like gimp_flip_layer and gimp_scale_layer without needing to name them.

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?

The description gives good conditional guidance on parameter choices (clip mode, interpolation at multiples of 90) but never says when to choose this tool over alternatives such as flipping or scaling, nor any prerequisites. Usage is implied rather than stated.

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