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).

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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."
  2. 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"
      +]
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Goes well beyond the annotations: states where the new layer is inserted (directly above target, inside its group), that gradients blend in sRGB and are undithered, that the current selection is preserved and does not clip the fill, and how the layer-limit accounting works. Minor gap: it does not say what happens on failure or how the operation is undone, despite destructiveHint=false and non-idempotency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core action and placement rule in the first sentence, then layers constraints, exclusions, and returns in a logical order. It is dense and slightly repetitive against the schema (sRGB blending and stop count appear twice), which keeps it just short of a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/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 nested point/stop objects, an output schema, and full annotation coverage, the description covers insertion position, masking behavior, gradient color space, selection interaction, and layer-size accounting. Nothing an agent needs to call this correctly is missing.

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 100%, so the baseline is 3. The description largely restates schema content — '2-8 colour stops', 'mask (a channel name)', 'mode color tints without touching lightness' — all of which already appear in the property descriptions, adding little beyond confirming defaults like start/end positions implicitly.

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?

Opens with a specific verb ('Add a NEW layer') plus the resource and the three fill operations, so the agent knows exactly what is produced. It also distinguishes itself from `add_adjustment`/`add_effect` style siblings by naming the fill-type enum inline and explicitly excluding `retouch`.

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

Usage Guidelines5/5

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

Contains an explicit when-not with the replacement: 'Do NOT use for painting strokes or touching up pixels; use `retouch` for that.' It also gives a task-level recommendation ('mode color ... the usual choice for recolouring'), routing the agent away from the `recolor` sibling for that intent.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources