get_map_region
Read raw tile ids from a rectangular window on any map layer to inspect just the painted area, saving tokens by avoiding a full map fetch.
Instructions
Read the raw tile ids in a rectangular window of one map layer — a token-cheap alternative to get_map for inspecting part of a painted map. Returns tiles as a 2D array (rows top→bottom, each left→right) of raw engine tile ids. The rectangle must lie fully within the map bounds (throws otherwise). layer defaults to 0 (see set_map_tile for the z-layer meanings).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Left edge of the window (tile column) | |
| y | Yes | Top edge of the window (tile row) | |
| layer | No | Z-layer 0-5 (0-1 lower, 2-3 upper, 4 shadow, 5 region); default 0 | |
| mapId | Yes | The ID of the map | |
| width | Yes | Window width in tiles | |
| height | Yes | Window height in tiles |