Skip to main content
Glama

Merge layers

merge_layers

Combine layers by merging one down, merging all visible layers, or flattening everything including the paper color into a single layer.

Instructions

Merge a layer down into the one below, merge all visible layers, or flatten everything (including the paper color) into one 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": {
      "mode": "<mode>"
    },
    "name": "merge_layers"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYes
layerNoFor mode down. Layer id, name, or index (0 = bottom, -1 = top). Default: the active layer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It usefully discloses a non-obvious detail — that flatten includes the paper color — but says nothing about whether the merged source layers are removed, whether the operation is undoable via the history sibling, or what happens when the mode's precondition is unmet.

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?

A single front-loaded sentence with three parallel clauses, one per mode, and zero filler. Every phrase corresponds to an enum value or a meaningful edge case.

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 with no output schema and no annotations, the description covers the meaningful behavior space, including flatten's treatment of the paper color. It is only slightly short on destructiveness/undo and precondition details that an agent merging layers might want.

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 50%: the layer parameter is documented in-schema, but the mode enum has no per-value description there. The description fills exactly that gap by mapping down/visible/flatten to concrete behaviors, including the paper-color edge case. It does not clarify layer-index/name resolution beyond the schema, keeping it from a 5.

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+resource (merge a layer) and then enumerates all three behaviors, which map one-to-one onto the mode enum (down/visible/flatten). An agent can tell exactly what this does without opening the schema, and its destructive-edit nature is clear from the verbs.

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?

Each mode's effect is spelled out, which implicitly tells the agent which mode to pick for which goal (merge one layer vs. all visible vs. flatten). What is missing is explicit guidance such as prerequisites (e.g., a visible layer must exist for 'visible') or when not to use it; there are no exclusions or named alternatives.

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