Skip to main content
Glama

tileset_manage

Inspect Godot TileSet resources: diagnose atlas issues, list occupied tile positions, and extract atlas textures as Base64 PNG images.

Instructions

TileSet management — atlas inspection tools.

Ops: • tileset_diagnose(tileset_path, check_collision=False, physics_layer=0, max_findings=80) Read-only TileSet doctor: missing textures, atlas sizing, tiles outside textures, tile pixel-size inconsistencies, and optional missing collision. Collision checks are opt-in because decorative tiles need no shapes. Rotated tile variants are not errors by themselves.

• 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.

Canonical call shape: {"op": "<verb>", "params": {...}}. Flat op parameters are accepted as a compatibility alias when the client transmits them; op and session_id remain top-level.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opYes
paramsNo
session_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv5.0.36
    • changedInput schema / properties / op / enum
      Previous value: -[
      -  "create_collision_polygon",
      -  "create_from_texture",
      -  "scaffold_terrain_bitmasks",
      -  "tileset_create_collision_polygon",
      -  "tileset_create_from_texture",
      -  "tileset_get_atlas_image",
      -  "tileset_get_atlas_tiles",
      -  "tileset_scaffold_terrain_bitmasks"
      -]New value: +[
      +  "create_collision_polygon",
      +  "create_from_texture",
      +  "scaffold_terrain_bitmasks",
      +  "tileset_create_collision_polygon",
      +  "tileset_create_from_texture",
      +  "tileset_diagnose",
      +  "tileset_get_atlas_image",
      +  "tileset_get_atlas_tiles",
      +  "tileset_scaffold_terrain_bitmasks"
      +]
  2. Changed1 schema field changedv5.0.14
    • changedInput schema / properties / op / enum
      Previous value: -[
      -  "tileset_get_atlas_image",
      -  "tileset_get_atlas_tiles"
      -]New value: +[
      +  "create_collision_polygon",
      +  "create_from_texture",
      +  "scaffold_terrain_bitmasks",
      +  "tileset_create_collision_polygon",
      +  "tileset_create_from_texture",
      +  "tileset_get_atlas_image",
      +  "tileset_get_atlas_tiles",
      +  "tileset_scaffold_terrain_bitmasks"
      +]
  3. First observedv4.1.0

TDQS

B3/5.0
Behavior3/5

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

For the documented ops, the description is highly transparent: it explicitly declares read-only behavior, explains opt-in collision checks, and enumerates error codes. However, because the schema includes mutation ops not mentioned in the description, the blanket read-only framing is misleading and the mutation behaviors are undisclosed. With no annotations, the description carries the full burden and falls short of revealing the tool's actual scope.

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-organized: a summary line, then each op with parameter lists, returns, and error codes, plus a workflow note and canonical call shape at the end. It is front-loaded with the purpose. It is somewhat verbose — the read-only status and error-code patterns repeat — but the structure makes it scannable and the length is justified by the detail.

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

Completeness2/5

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

The tool has nine ops in the enum but only three are described, and the create operations are entirely missing. The description includes return shapes for two ops but not for diagnose, and the output schema (though present) isn't used. The mischaracterization as read-only atlas inspection further undermines completeness for an agent trying to decide whether to invoke this tool for creation workflows.

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?

The description provides detailed parameter semantics for the three documented ops (tileset_path, source_id, max_size, check_collision, etc.), fully compensating for the 0% schema coverage for those ops. But it gives zero parameter documentation for the six other ops in the enum, so overall coverage is partial. For the described subset it's excellent, but as a tool-wide definition it's incomplete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose for the three atlas-inspection ops (diagnose, get_atlas_tiles, get_atlas_image) and differentiates from editor_screenshot in the workflow note. However, the op enum includes create operations (create_collision_polygon, create_from_texture, etc.) that are completely omitted, making the stated purpose 'atlas inspection tools' misleading about the tool's full scope.

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 workflow note gives explicit guidance to use tileset_get_atlas_image over editor_screenshot, and the read-only nature of the documented ops is stated. But there is no guidance for the create ops (which exist in the schema), no comparison to sibling tools like resource_manage or tilemap_manage, and no when-not-to-use conditions beyond the screenshot alternative.

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

Deploy Server

Other Tools