Skip to main content
Glama

set_cel

Set a cel's position, opacity, or z-index on specific frames, optionally creating missing cels and copying linked ones first so other frames stay unchanged.

Instructions

Set the position, opacity and/or z-index of a layer's cels in the given frames.

The position is the sprite coordinate of the cel image's top-left corner; an axis left out keeps its value. A frame without a cel is an error unless create is true, which adds an empty cel at (0, 0) first. Linked cels get their own copy before they move or fade, so frames outside the list never change. The layer must not be locked.

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

Input Schema

NameRequiredDescriptionDefault
xNoCel left edge in sprite pixels
yNoCel top edge in sprite pixels
pathYesSprite file. Relative paths resolve against the server root.
layerYesLayer name, or a 'group/child' path for nested layers
createNoCreate an empty cel where the layer has none
framesYesFrames: a number, "1-4", "1-4,7" or "all" (1-based)
opacityNoCel opacity, 0..255
z_indexNoDraw order offset against other layers' cels
relativeNoMove by x/y instead of moving to x/y

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does well: it discloses that linked cels are copied before mutation so frames outside the list are unaffected, that a missing cel raises an error unless create adds an empty cel at (0,0), and that omitted axes retain their value. It does not mention undo/history implications or what the call returns, which is partly mitigated by the existing output schema.

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?

Four compact sentences, front-loaded with the operation, then preconditions, then side-effect guarantees. There is no filler, no restatement of the tool name, and each clause carries distinct operational information.

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 no annotations, the description covers the critical unknowns: lock requirement, linked-cel copy safety, and the create-on-missing-cel path. Minor gaps remain around interaction of relative with create and any undo semantics, though the output schema covers return values.

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 already 100%, so the baseline is 3. The description still adds genuine meaning beyond the schema by stating that an omitted axis (null) preserves the current value and that create only takes effect for frames lacking a cel, clarifying the null-semantics of x/y that the schema does not spell out.

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?

States a specific verb (set) and precisely enumerates the affected attributes (position, opacity, z-index) plus the target scope (a layer's cels in the given frames). This clearly separates it from raster-drawing siblings like draw_pixels or set_tiles.

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?

Gives concrete preconditions and failure modes: the layer must not be locked, and a missing cel is an error unless create is true. It does not route the agent to any alternative tool or explain when a different operation (e.g. clear_cels, set_tiles) should be preferred, so it stops short of explicit alternatives.

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