Skip to main content
Glama

flatten_sprite

Merge all visible sprite layers into one layer and drop hidden layers, simplifying export or editing as a single image.

Instructions

Flatten all visible layers into a single layer; hidden layers are dropped.

Like every whole-sprite change, it ignores layer locks.

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>"
    },
    "name": "flatten_sprite"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesSprite file. Relative paths resolve against the server root.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations at all, the description still discloses two high-value behaviors: hidden layers are destroyed, and layer locks are ignored. What is missing is whether the operation is reversible/undoable and whether it applies across animation frames, which matters for a destructive whole-sprite merge.

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?

Two short sentences, front-loaded with the core effect and immediately followed by the surprising side effect. No redundant restatement of the tool name or filler.

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?

Low complexity (one parameter, output schema present) is well covered, and the destructive semantics are called out. Only the reversibility/undo question and frame-vs-sprite scope leave a gap for a mutation tool with zero annotation coverage.

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%, so the single 'path' parameter is already fully documented in-schema. The description adds no path format, resolution, or file-type detail beyond that, which is the expected baseline when the schema carries the load.

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?

Specific verb (flatten) plus resource (layers) with explicit scope: all visible layers become one, hidden layers are dropped. No sibling in the catalog flattens layers, so the operation is unambiguous without opening the schema.

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?

The description implies when this applies (a whole-sprite layer-merge operation) but never states when to prefer it over per-layer tools like duplicate_layer or copy_layers, and gives no preconditions or exclusions beyond the lock note.

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