Skip to main content
Glama

tilemap_manage

Set, fill, clear, and read cells on TileMapLayer nodes in Godot scenes. Supports undo and works with specialized tile sets.

Instructions

TileMap / TileMapLayer authoring (set tiles, fill rects, clear, read cells).

All operations target TileMapLayer nodes in the currently edited scene by scene-relative path (e.g. "/LavaLake20x20/Ground"). All write ops are undoable via EditorUndoRedoManager.

source_id is the TileSet source index. atlas_col/atlas_row are the atlas coordinates of the tile within that source. For full-tile animated sources (lava, water, sewage) use atlas_col=0, atlas_row=0.

IMPORTANT — Source-ID remapping in specialized .tres files: When a layer uses a specialized .tres (e.g. volcano_animated.tres), Source-IDs are re-numbered from 0. Example: volcano lava is Source 8 in the main volcano.tres but Source 0 in volcano_animated.tres. Always use the remapped ID when the TileMapLayer references a specialized .tres, not the original ID from the main .tres.

Ops: • tilemap_set_cell(path, source_id, atlas_col, atlas_row, map_x, map_y) Set a single tile at (map_x, map_y). Returns: {map_x, map_y, source_id, atlas_col, atlas_row}

• tilemap_set_cells_rect(path, source_id, atlas_col, atlas_row, rect_x, rect_y, rect_w, rect_h) Fill a rect_w × rect_h region starting at (rect_x, rect_y) with one tile type in a single undo action. Returns: {cells_filled, rect: {x, y, w, h}}

• tilemap_clear(path) Remove all tiles from the layer. Returns: {cleared: true}

• tilemap_get_cells(path) Return all used cell coordinates. Returns: {cells: [{x, y}, ...], count: int}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opYes
paramsNo
session_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description fully discloses behavior: targets current scene, requires scene-relative paths, undoable write ops, and detailed notes on source-ID remapping in specialized .tres files. Return values are also specified for each operation.

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 description is well-structured with a general intro, an important note about source-ID remapping, and a bulleted list of ops with their parameters and returns. It is informative but could be slightly more concise without loss of clarity.

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

Completeness5/5

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

Given the complexity of tilemap authoring, the generic input schema, and the lack of annotations, the description is highly complete. It covers all necessary context: how paths work, undo behavior, remapping, and each operation's parameters and return values. The presence of an output schema is also consistent with the described returns.

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

Parameters5/5

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

Schema coverage is 0%, so description carries full burden. It thoroughly explains each op's parameters (path, source_id, atlas_col, atlas_row, map_x, map_y, rect dimensions) and their meanings, including the important remapping note. This adds significant value beyond the generic schema.

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 clearly states it is for TileMap/TileMapLayer authoring with specific operations (set tiles, fill rects, clear, read cells). This distinguishes it from sibling tools like tileset_manage which deal with tilesets, not tile layers.

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?

The description provides clear context: operations target TileMapLayer nodes in the currently edited scene by scene-relative path, and write ops are undoable. It does not explicitly compare with alternatives, but the resource and operation set imply when to use.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hi-godot/godot-ai'

If you have feedback or need assistance with the MCP directory API, please join our Discord server