Skip to main content
Glama

merge_layer_down

Merges a layer into the layer below it within the same group across every frame, using unlocked image layers and returning the merged layer path.

Instructions

Merge a layer into the one below it in the same group, in every frame.

Both must be image layers (not groups or tilemaps) and neither may be locked. The layer is merged even when hidden. Returns the path of the merged layer.

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

Input Schema

NameRequiredDescriptionDefault
pathYesSprite file. Relative paths resolve against the server root.
layerYesLayer name, or a 'group/child' path for nested layers

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does real work: it declares the frame-wide scope, the layer-type restriction, the lock restriction, and the non-obvious exception that hidden layers are still merged. It stops short of saying whether the operation is undoable or what happens to the destination layer's blending and opacity settings.

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

Conciseness5/5

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

Three short sentences, front-loaded with the action and scope, then constraints, then the return value. No sentence is redundant and none restates the name.

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 two-parameter mutation tool without annotations, the description covers scope, restrictions, the hidden-layer edge case, and the return value (which the output schema makes largely optional). Only secondary effects on the destination layer remain undocumented, a minor gap.

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%, with both path and layer already documented, including the 'group/child' nested-path convention. The description adds no format, syntax, or edge-case detail beyond what the schema provides, so the baseline 3 applies.

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 ("Merge a layer into the one below it") and adds distinguishing scope ("in the same group, in every frame"). That scope clause separates it from siblings like duplicate_layer or copy_layers without needing 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?

It states the preconditions that gate use: both layers must be image layers, not groups or tilemaps, and neither may be locked. That functions as a when-not filter, though it never names an alternative tool for cases like merging into a layer in a different group.

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