Skip to main content
Glama
PengLx
by PengLx

Read a tile region

tiled_get_region
Read-onlyIdempotent

Retrieves a rectangular tile region from a Tiled map layer using tile coordinates and layer ID. Returns tile asset IDs or embedded references, with support for infinite maps and XML map raw GIDs.

Instructions

Returns a bounded rectangular tile region using tileset asset IDs and local tile IDs. Cells referencing an embedded (inline) tileset return a read-only {kind:"embedded", sourceIndex} reference instead of an asset ID. On infinite maps the rectangle uses absolute tile coordinates (negatives allowed) and cells outside every chunk are empty. XML maps (.tmx) return raw encoded GIDs (flip bits included) plus the map's tileset ranges so callers attribute cells by firstgid themselves; finite csv and base64 layers only — plain tile elements and chunks fail closed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYes
yYes
widthYes
heightYes
layerIdYes
mapPathYesCanonical project-relative POSIX path; absolute paths and .. are forbidden

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Beyond annotations (readOnlyHint, idempotentHint, destructiveHint), the description provides significant behavioral detail: embedded tilesets yield a read-only reference, infinite maps use absolute coordinates with empty cells outside chunks, and XML maps return raw GIDs with flip bits and firstgid ranges. It also notes failure modes for plain tile elements and chunks, adding concrete constraints.

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 packed with information and avoids redundancy, but its single-paragraph structure could be more scannable with bullet points or clearer separation of map types (infinite vs. XML vs. finite). It is not overly long, but a slight reorganization would improve readability.

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?

Given the tool's complexity, the description covers most edge cases (embedded tilesets, infinite maps, XML maps) and failure modes. An output schema exists to document return values. However, it does not mention potential performance implications or pagination (if any), which could be relevant for large regions. Still, it is largely complete.

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

Parameters2/5

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

With 17% schema description coverage (only mapPath described), the description adds some high-level context (coordinate system, tile ID references) but does not explain each parameter individually. For example, x, y, width, height are not explicitly defined as the rectangle's origin and dimensions, and layerId is not mentioned. The description fails to fully compensate for the schema's lack of parameter details.

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 that the tool returns a bounded rectangular tile region, specifying the use of tileset asset IDs and local tile IDs. It distinguishes itself from siblings like tiled_find_tiles or tiled_get_map_summary by detailing unique behaviors for embedded tilesets, infinite maps, and XML maps, making the purpose unambiguous.

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 description implicitly indicates usage for rectangular tile regions but lacks explicit guidance on when to use this tool versus alternatives such as tiled_get_tileset or tiled_find_tiles. It does not state prerequisites or scenarios where this tool is preferred, leaving the agent to infer from context.

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/PengLx/TiledMCP'

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