Skip to main content
Glama

Set style

set_style
Destructive

Set style fields on a layer. Only the fields you pass are changed; omit a field to leave it untouched. Covers border/radius/shadow (including borderAlign — inner|center|outer border position) plus image-only fields: fit (stretch|cover|contain), anchorX/anchorY (0..1, where the source anchors when cropping/letterboxing under cover/contain), tintColor (#rrggbb) + tintStrength (0..1) for a colour overlay painted source-atop, and alphaMask (linear gradient — see below) for a multiplicative alpha fade across the layer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fitNoFit mode (image + video layers). Default: stretch for image layers, cover for video layers.
anchorXNoObject-position X (0..1). 0=left, 1=right, 0.5=centre. Only meaningful with fit=cover|contain.
anchorYNoObject-position Y (0..1). 0=top, 1=bottom, 0.5=centre. Only meaningful with fit=cover|contain.
alphaMaskNoLinear alpha-mask gradient (image layers). Multiplies the layer's alpha along a gradient line — used to fade a layer out partway across (the front half of a 'sandwich' covering text below it). Object: { type: 'linear', angle: number (deg, CSS-style; 0=to top, 90=to right, 180=to bottom, 270=to left), stops: [{offset:0..1, alpha:0..1}, ...] (≥2 stops, ordered by offset) }. Pass null to clear.
boxShadowNoCSS box-shadow string, e.g. "0 4px 12px rgba(0,0,0,0.5)". Pass an empty string "" or null to REMOVE the shadow.
elementIdYes
projectIdYesOpaque project id (a v4 UUID, from list_projects/create_project). Selects which existing project this call mutates.
tintColorNo#rrggbb tint colour painted source-atop over the image (image layers only).
blend_modeNoPhotoshop-style layer blend mode (Canvas globalCompositeOperation). 'normal' is the default. Applies to every layer kind; allowed on group.<id> too (the only set_style field that is).
chroma_keyNoGreen-screen key (video / image layers). Makes pixels near `color` transparent at render time so layers below show through. Object: { color: '#rrggbb' (default '#00ff00'), similarity: 0..1 (match radius, default 0.4), smoothness: 0..1 (edge feather, default 0.1) }. Pass null to clear.
borderAlignNoWhere the border sits relative to the layer's edge (design-tool "border position"). "inner" (default) draws the band INSIDE the box so it eats into the content; "outer" draws it entirely OUTSIDE so it frames the content without covering it; "center" straddles the edge 50/50. Rectangular boxes (image/video/text) only — shapes always stroke centred on their silhouette and ignore it.
borderColorNo#rrggbb.
borderWidthNo
borderRadiusNo
tintStrengthNoTint blend strength 0..1. 0=no tint, 1=image silhouette filled with tintColor. Default 0 (no tint).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesWhether the call succeeded.
dataNoThe payload, shaped by the tool.
noteNoWhat to do next when not ready.
errorNoWhy it failed.
statusNoFor cache-backed readers: whether the answer was ready.
editorUrlNoOpens this project in the editor.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / anonymousToken
      Removed value: -{
      -  "description": "The token create_anonymous_account returned. This connection has no Morpha key, so every call carries it.",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "elementId",
      -  "projectId",
      -  "anonymousToken"
      -]New value: +[
      +  "elementId",
      +  "projectId"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "The result envelope every Morpha tool returns.",
      +  "properties": {
      +    "data": {
      +      "description": "The payload, shaped by the tool.",
      +      "type": [
      +        "object",
      +        "array",
      +        "string",
      +        "number",
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "editorUrl": {
      +      "description": "Opens this project in the editor.",
      +      "type": "string"
      +    },
      +    "error": {
      +      "description": "Why it failed.",
      +      "type": "string"
      +    },
      +    "note": {
      +      "description": "What to do next when not ready.",
      +      "type": "string"
      +    },
      +    "ok": {
      +      "description": "Whether the call succeeded.",
      +      "type": "boolean"
      +    },
      +    "status": {
      +      "description": "For cache-backed readers: whether the answer was ready.",
      +      "enum": [
      +        "ready",
      +        "not-ready"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "ok"
      +  ],
      +  "type": "object"
      +}
  3. Changed2 schema fields changed
    • addedInput schema / properties / anonymousToken
      Added value: +{
      +  "description": "The token create_anonymous_account returned. This connection has no Morpha key, so every call carries it.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "elementId",
      -  "projectId"
      -]New value: +[
      +  "elementId",
      +  "projectId",
      +  "anonymousToken"
      +]
  4. Changed7 schema fields changed
    • removedInput schema / properties / alphaMask / oneOf
      Removed value: -[
      -  {
      -    "type": "null"
      -  },
      -  {
      -    "properties": {
      -      "angle": {
      -        "type": "number"
      -      },
      -      "stops": {
      -        "items": {
      -          "properties": {
      -            "alpha": {
      -              "maximum": 1,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "offset": {
      -              "maximum": 1,
      -              "minimum": 0,
      -              "type": "number"
      -            }
      -          },
      -          "required": [
      -            "offset",
      -            "alpha"
      -          ],
      -          "type": "object"
      -        },
      -        "minItems": 2,
      -        "type": "array"
      -      },
      -      "type": {
      -        "enum": [
      -          "linear"
      -        ],
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "stops"
      -    ],
      -    "type": "object"
      -  }
      -]
    • addedInput schema / properties / alphaMask / properties
      Added value: +{
      +  "angle": {
      +    "type": "number"
      +  },
      +  "stops": {
      +    "items": {
      +      "properties": {
      +        "alpha": {
      +          "maximum": 1,
      +          "minimum": 0,
      +          "type": "number"
      +        },
      +        "offset": {
      +          "maximum": 1,
      +          "minimum": 0,
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "offset",
      +        "alpha"
      +      ],
      +      "type": "object"
      +    },
      +    "minItems": 2,
      +    "type": "array"
      +  },
      +  "type": {
      +    "enum": [
      +      "linear"
      +    ],
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / alphaMask / required
      Added value: +[
      +  "stops"
      +]
    • addedInput schema / properties / alphaMask / type
      Added value: +[
      +  "object",
      +  "null"
      +]
    • removedInput schema / properties / chroma_key / oneOf
      Removed value: -[
      -  {
      -    "type": "null"
      -  },
      -  {
      -    "properties": {
      -      "color": {
      -        "type": "string"
      -      },
      -      "similarity": {
      -        "maximum": 1,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "smoothness": {
      -        "maximum": 1,
      -        "minimum": 0,
      -        "type": "number"
      -      }
      -    },
      -    "type": "object"
      -  }
      -]
    • addedInput schema / properties / chroma_key / properties
      Added value: +{
      +  "color": {
      +    "type": "string"
      +  },
      +  "similarity": {
      +    "maximum": 1,
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  "smoothness": {
      +    "maximum": 1,
      +    "minimum": 0,
      +    "type": "number"
      +  }
      +}
    • addedInput schema / properties / chroma_key / type
      Added value: +[
      +  "object",
      +  "null"
      +]
  5. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the destructiveHint/readOnly annotations, it discloses important behavioral nuances: partial update semantics, borderAlign placement effects (inner draws inside and eats content), pass-null-to-clear patterns, and alphaMask as a multiplicative fade. This substantially exceeds what the annotations alone convey.

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?

The description is dense but well organized: core semantics first, then a compact inventory of fields with parenthetical clarifications. A few long asides (e.g., the full alphaMask pointer) are included, but they replace schema detail and are not redundant.

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 15-parameter mutation with a rich schema and output schema, the description covers the critical behavioral surface: what counts as style, which fields are image-only, partial-update semantics, and clear/removal patterns. It does not mention blend_mode or chroma_key, but those are thoroughly described in the schema and are not hidden behaviors.

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 high (80%), so the schema already documents most parameters. The description adds value by grouping parameters into style families and spelling out semantic relationships (e.g., anchorX/anchorY meaningful only under cover/contain, tintStrength with tintColor). It does not need to repeat every schema description.

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?

The description opens with a specific verb and resource ('Set style fields on a layer') and immediately delimits its scope by enumerating the field families it covers (border/radius/shadow plus image-only fields). This makes it easy to distinguish from sibling tools like set_layer_fill or set_layer_text even without opening their schemas.

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?

The description gives clear usage context: partial updates are the default ('Only the fields you pass are changed; omit a field to leave it untouched'), and it flags image-only constraints early. It does not explicitly name alternative tools or list when-not-to-use conditions, so it stops short of full routing guidance.

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