tileset_manage
Retrieve occupied atlas tile positions and atlas sprite-sheet textures from a TileSet resource as base64 PNG images, enabling read-only inspection without editor interaction.
Instructions
TileSet management — atlas inspection tools.
Ops: • tileset_get_atlas_tiles(tileset_path, source_id) Return all occupied atlas tile positions for one source in a TileSet. Read-only — does not modify any resource or project file.
tileset_path: res:// path to the .tres TileSet resource (required)
source_id: raw TileSet source id of the TileSetAtlasSource to query (required, ≥ 0)
Returns:
{"tiles": [{"col": int, "row": int}, ...], "count": int}
Error codes (passed through from GDScript handler):
MISSING_REQUIRED_PARAM — tileset_path empty or source_id absent
RESOURCE_NOT_FOUND — tileset_path does not exist on disk
WRONG_TYPE — not a TileSet, or source is not a TileSetAtlasSource
VALUE_OUT_OF_RANGE — source_id does not exist in this TileSet• tileset_get_atlas_image(tileset_path, source_id, max_size=0) Return the atlas sprite-sheet texture of a TileSetAtlasSource as a Base64-encoded PNG image. Read-only — reads the texture directly from the resource without any UI interaction.
tileset_path: res:// path to the .tres TileSet resource (required)
source_id: raw TileSet source id of the TileSetAtlasSource to query (required, ≥ 0)
max_size: optional int; if > 0, scale the image so its longest
edge is at most max_size pixels (default 0 = full res)
Returns:
{"image_base64": str, "width": int, "height": int,
"original_width": int, "original_height": int, "format": "png"}
Error codes (passed through from GDScript handler):
MISSING_REQUIRED_PARAM — tileset_path empty or source_id absent
RESOURCE_NOT_FOUND — tileset_path does not exist on disk
WRONG_TYPE — not a TileSet, source not a TileSetAtlasSource,
or source has no texture assigned
VALUE_OUT_OF_RANGE — source_id does not exist in this TileSet• Atlas image workflow: To visually inspect what tiles look like, use tileset_get_atlas_image instead of editor screenshots. It reads the texture directly from the resource — no UI interaction or editor state required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| params | No | ||
| session_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||