Skip to main content
Glama

set_tiles

Places tiles into specified grid cells of a single tilemap frame, creating or expanding the cel as needed. Use it to set tile indices by column and row, with later entries overriding duplicates.

Instructions

Place tiles in grid cells (col, row from 0 at the grid origin) of one frame.

The cel is created or grown as needed. Cells must lie on the canvas grid and indices below the tileset's tile_count. A later entry for the same cell wins. A cel linked to other frames gets its own copy first.

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>",
      "frame": "<frame>",
      "tiles": "<tiles>"
    },
    "name": "set_tiles"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesSprite file. Relative paths resolve against the server root.
frameYes1-based frame number
layerYesTilemap layer name or 'group/child' path
tilesYesCells as {col, row, index}

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/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 behavioral burden and does meaningfully: it discloses that the cel is created or grown as needed, that duplicate cells resolve last-wins, and that a cel shared with other frames is copied before mutation — a non-obvious copy-on-write side effect. It does not state whether untouched cells are preserved or cleared, nor any permission requirements, so it is strong but not complete.

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?

The core action and coordinate convention are front-loaded in the first sentence, followed by short constraint sentences with no filler. Every clause carries either a precondition or a behavioral rule; nothing is redundant with the schema.

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 four-required-parameter mutation tool with an output schema and no annotations, the description covers the important semantics (additive growth, last-wins duplicates, copy-on-write for shared cels). The main remaining gap is whether existing tiles in the frame are preserved or replaced, and how failures on out-of-bounds indices or unknown layers are reported.

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 description coverage is 100%, so the baseline would be 3, but the description adds genuine meaning beyond the schema: it explains the col/row origin convention and imposes an upper bound on the tile index (below the tileset's tile_count) that the schema itself does not express. It also implies the per-entry shape {col, row, index} via the duplicate-cell rule.

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 opens with a specific verb and resource: 'Place tiles in grid cells ... of one frame', and clarifies the coordinate origin (0 at the grid origin). It is clearly a bulk tilemap-write operation, distinguishable in intent from a single-cel or single-tile draw. It does not explicitly name a sibling alternative, which keeps it just below the top mark.

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?

Constraints are stated (cells must lie on the canvas grid, indices below the tileset's tile_count, one frame only), which tells the agent the preconditions for a successful call. However, there is no explicit when-to-use / when-not-to-use routing against siblings such as set_cel or draw_tile, so the guidance is implied rather than directive.

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