Skip to main content
Glama

layer_mask

Destructive

A real layer mask (it moves with the layer). create from a saved selection channel (e.g. from select or select_with_ai) or from white, black, the layer's transparency or grayscale; delete; apply (bake the mask into the layer's transparency: a cut-out); invert. For a cut-out composite: place the photo as a layer, select on that layer, then create its mask from the channel.

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": "layer_mask"
  }
}

Input Schema

NameRequiredDescriptionDefault
opYescreate replaces any existing mask. apply bakes the mask into the layer's alpha.
imageYesImage id, as returned by open_photo.
layerNoLayer name. Defaults to the selected layer, or the topmost layer if none is selected.
invertNocreate: invert the new mask.
sourceNocreate: where the mask comes from.channel
channelNosource=channel: the saved selection to use.
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
layerNo
has_maskNo
layer_idNo
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. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources