Skip to main content
Glama

convert_layer_to_background

Convert a normal layer into the sprite's opaque Background layer, filling transparent pixels deterministically with black on RGB/grayscale sprites or the transparent palette index on indexed sprites.

Instructions

Convert a normal layer into the sprite's opaque Background layer.

Its transparent pixels are filled: with black on an RGB or grayscale sprite, and with
the transparent palette index on an indexed one, which a Background shows as that
entry's colour, so no index changes and converting back restores the transparency.
The fill used to come from the editor's colour bar, so the same call gave a different
colour on every machine.

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": {
      "filename": "<filename>",
      "layer": "<layer>"
    },
    "name": "convert_layer_to_background"
  }
}

Input Schema

NameRequiredDescriptionDefault
layerYes
filenameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.10.0
    • removedInput schema / properties / filename / title
      Removed value: -"Filename"
    • removedInput schema / properties / layer / title
      Removed value: -"Layer"
    • removedInput schema / title
      Removed value: -"convert_layer_to_backgroundArguments"
  2. First observedv0.7.0

TDQS

B3.4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and openWorldHint=false, so the description carries most of the behavioral burden, and it does well: it discloses exactly which pixels are modified, the fill value per sprite colour mode, the indexed-palette semantics, and that the operation is reversible. It omits practical traits such as whether the change is persisted to disk and any error conditions, which keeps it from 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?

The core action and its pixel-level consequences are front-loaded and precise. The closing historical note about the editor colour bar is longer than needed to make its point about deterministic output, though it does convey a real behaviour change rather than pure filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no output schema, the description explains the mutation and its reversibility well but leaves both parameters undefined, which is a significant gap for a 2-required-param call. It is adequate on behaviour and thin on invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for two required parameters, so the description must compensate but does not. It never clarifies what 'filename' refers to (sprite path vs. identifier) or whether 'layer' is a layer name, index, or ID — only indirectly implying via 'a normal layer' that the target must be non-background.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Convert a normal layer into the sprite's opaque Background layer') and makes the direction of conversion unambiguous, which distinguishes it from the sibling convert_background_to_layer. It stops short of naming that sibling explicitly, so a routing statement is left implicit.

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?

Preconditions are implied by 'a normal layer', which tells the agent the input must be a non-background layer, but there is no explicit when-to-use/when-not-to-use guidance, no mention of what happens if the layer is already a Background, and no named alternative. Usage is inferable rather than stated.

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

Deploy Server

Other Tools