Skip to main content
Glama

update_layer

Modify a layer's name, visibility, lock state, opacity, blend mode, parent, or stack position without changing unspecified fields. Use it to move and restyle layers, including locked layers.

Instructions

Rename, show/hide, lock/unlock, restyle or move a layer; only the given fields change.

The layer is moved first (parent, then stack_index), then its properties are set. All of this works on locked layers too. Groups have no opacity or blend mode. Returns the layer's new path and stack index.

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": {
      "path": "<path>",
      "layer": "<layer>"
    },
    "name": "update_layer"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesSprite file. Relative paths resolve against the server root.
layerYesLayer name, or a 'group/child' path for nested layers
lockedNoLock or unlock the layer against pixel and cel edits
parentNoGroup to move the layer into; empty string for the top level
opacityNoLayer opacity, 0..255
visibleNoShow or hide the layer
new_nameNoNew layer name
blend_modeNoLayer blend mode
stack_indexNoPosition inside the (new) parent, 1 = bottom

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the whole load and does well: it discloses partial-update semantics, the internal ordering (move first via parent then stack_index, then property setters), that it works on locked layers, and that groups reject opacity/blend mode. It does not cover failure behavior (e.g. invalid parent, out-of-range stack index) or permission requirements, which keeps it below a 5.

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?

Four tight sentences with the capability list front-loaded and behavioral caveats after it; nothing is padding. The final sentence about the return value is mildly redundant given an output schema exists, but it is short and still aids the caller.

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 9-parameter mutation tool with full schema coverage, an output schema, and no annotations, the description supplies the important non-schema behavior: partial update, operation ordering, locked-layer tolerance, and group restrictions. The remaining gap is error/prerequisite behavior and sibling routing, neither of which is fatal here.

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 100%, so 3 is the baseline, and the description adds real meaning on top: null/default fields are explicitly a no-op ('only the given fields change'), and the parent-then-stack_index ordering tells the caller that stack_index is interpreted inside the new parent. It stops short of describing edge cases such as moving a layer into its own descendant.

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 concrete verbs and the resource they act on: 'Rename, show/hide, lock/unlock, restyle or move a layer'. That enumeration covers every field in the schema and makes it plainly distinct from siblings like add_layer, delete_layer and duplicate_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?

Usage context is implied rather than stated: an agent can infer this is the tool for mutating an existing layer's attributes, but there is no explicit when-to-use/when-not guidance and no mention of alternatives for moving or copying layers. The 'only the given fields change' clause is a partial-update semantic, not a routing hint.

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