Skip to main content
Glama

fill

Add a NEW layer, canvas-sized, filled with a solid colour (op solid), a linear gradient (start to end) or a radial gradient (centre and radius) through 2-8 colour stops. The layer goes directly above the target layer (inside its group), with the blend mode and opacity you give; mode color tints without touching lightness, the usual choice for recolouring. Pass mask (a channel name) to confine the fill to that channel: it becomes the layer mask. Gradients blend in sRGB, are not dithered, and use photo pixels for every point. The current selection is kept and does not clip the fill. Do NOT use for painting strokes or touching up pixels; use retouch for that. Returns layer_id, layer_name, op, mode, opacity and masked. On this server the new layer is canvas-sized, so it counts toward a photo's layers together staying within its layer limit, each counted at the canvas size (or the largest layer size used in the photo, if bigger).

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>",
      "op": "<op>"
    },
    "name": "fill"
  }
}

Input Schema

NameRequiredDescriptionDefault
opYes'solid': one flat color. 'linear_gradient': a ramp from start to end. 'radial_gradient': a ramp from a center out to a radius.
endNolinear_gradient: where offset 1 sits, in image pixels. Default bottom center of the canvas.
maskNoThe name of a selection channel: becomes the new layer's layer mask, white where the channel is selected, so the fill shows only there.
modeNoThe new layer's blend mode. 'color' keeps the lightness underneath exactly and swaps only hue and chroma, the usual choice for recoloring.normal
nameNoNew layer's name. Default 'Fill' for solid, 'Gradient' for a gradient.
colorNosolid only: the color as #rrggbb.
imageYesImage id, as returned by open_photo.
layerNoName of the layer the new fill layer goes directly above (inside its group). Defaults to the selected layer, or the topmost layer if none is selected.
startNolinear_gradient: where offset 0 sits, in image pixels. Default top center of the canvas.
stopsNoGradient only: 2-8 color stops {offset 0..1, color #rrggbb, opacity 0..100}, sorted by offset. Colors blend in sRGB (a black to white stop pair reads 128 at the midpoint). Before the first stop and after the last, the end colors hold.
centerNoradial_gradient: where offset 0 sits, in image pixels. Default canvas center.
radiusNoradial_gradient: the distance in pixels at which offset 1 is reached. Default half the canvas diagonal.
opacityNoThe new layer's opacity, 0-100.
layer_idNoLayer id, as inspect (and any tool that creates a layer) reports it. Takes priority over `layer`, and is the only way to address one of two layers that share a name.

Output Schema

NameRequiredDescriptionDefault
opNo
modeNo
maskedNo
opacityNo
layer_idNo
layer_nameNo
mindset_notesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedOutput schema / properties / editor_notes
      Removed value: -{
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • addedOutput schema / properties / mindset_notes
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed1 schema field changed
    • addedOutput schema / properties / editor_notes
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  3. Changed6 schema fields changed
    • changedInput schema / properties / center / description
      Previous value: -"radial_gradient: where offset 0 sits, in image pixels. Default canvas centre."New value: +"radial_gradient: where offset 0 sits, in image pixels. Default canvas center."
    • changedInput schema / properties / color / description
      Previous value: -"solid only: the colour as #rrggbb."New value: +"solid only: the color as #rrggbb."
    • changedInput schema / properties / end / description
      Previous value: -"linear_gradient: where offset 1 sits, in image pixels. Default bottom centre of the canvas."New value: +"linear_gradient: where offset 1 sits, in image pixels. Default bottom center of the canvas."
    • changedInput schema / properties / op / description
      Previous value: -"'solid': one flat colour. 'linear_gradient': a ramp from start to end. 'radial_gradient': a ramp from a centre out to a radius."New value: +"'solid': one flat color. 'linear_gradient': a ramp from start to end. 'radial_gradient': a ramp from a center out to a radius."
    • changedInput schema / properties / start / description
      Previous value: -"linear_gradient: where offset 0 sits, in image pixels. Default top centre of the canvas."New value: +"linear_gradient: where offset 0 sits, in image pixels. Default top center of the canvas."
    • changedInput schema / properties / stops / description
      Previous value: -"Gradient only: 2-8 colour stops {offset 0..1, color #rrggbb, opacity 0..100}, sorted by offset. Colours blend in sRGB (a black to white stop pair reads 128 at the midpoint). Before the first stop and after the last, the end colours hold."New value: +"Gradient only: 2-8 color stops {offset 0..1, color #rrggbb, opacity 0..100}, sorted by offset. Colors blend in sRGB (a black to white stop pair reads 128 at the midpoint). Before the first stop and after the last, the end colors hold."
  4. Changed2 schema fields changed
    • changedInput schema / properties / mode / description
      Previous value: -"The new layer's blend mode: layer's list plus 'lch_color'. 'color' is HSL Color; 'lch_color' (LCh Color) keeps the lightness underneath exactly and swaps only hue and chroma, the better choice for recolouring."New value: +"The new layer's blend mode. 'color' keeps the lightness underneath exactly and swaps only hue and chroma, the usual choice for recoloring."
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "normal",
      -  "multiply",
      -  "screen",
      -  "overlay",
      -  "soft_light",
      -  "hard_light",
      -  "darken",
      -  "lighten",
      -  "difference",
      -  "exclusion",
      -  "addition",
      -  "subtract",
      -  "divide",
      -  "dodge",
      -  "burn",
      -  "hue",
      -  "saturation",
      -  "color",
      -  "luminosity",
      -  "grain_extract",
      -  "grain_merge",
      -  "lch_color"
      -]New value: +[
      +  "normal",
      +  "multiply",
      +  "screen",
      +  "overlay",
      +  "soft_light",
      +  "hard_light",
      +  "darken",
      +  "lighten",
      +  "difference",
      +  "exclusion",
      +  "linear_dodge",
      +  "subtract",
      +  "divide",
      +  "color_dodge",
      +  "color_burn",
      +  "hue",
      +  "saturation",
      +  "color",
      +  "luminosity"
      +]
  5. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources