Skip to main content
Glama

Render map as image

render_map_image

Renders a map as a PNG image to visually verify tile layers, event markers, regions, grid, and passability after map edits.

Instructions

Render a map to a PNG image so you can SEE what it looks like: all tile layers with correct autotile shapes, shadows and tiles that draw above characters, optionally the events' character sprites, coloured event markers with their ids, region ids, a tile grid and a passability overlay (red = blocked in at least one direction). This is the visual counterpart of render_map (text) - use it after paint_tiles / create_event / connect_maps to check your work. Marker colours: blue = event with a Transfer Player command (door/exit), orange = shows text, magenta = autorun/parallel, green = anything else. Needs the tileset images in img/tilesets (sheets without an image are drawn as flat colours and listed). Large maps are shrunk to fit ~1600px; pass x/y/width/height to zoom into a region and raise tileSize for detail.

Input Schema

NameRequiredDescriptionDefault
xNoRegion left edge in tiles
yNoRegion top edge in tiles
mapIdYes
widthNoRegion width in tiles (default: to the map's right edge)
heightNoRegion height in tiles (default: to the map's bottom edge)
showGridNoOverlay a tile grid
tileSizeNoPixels per map tile (48 = full resolution). Reduced automatically so the image stays under ~1600px
showEventsNoDraw event character sprites, coloured id markers, both, or neitherboth
showRegionsNoOverlay region ids (layer 5)
showPassabilityNoTint blocked cells translucent red (blocked in at least one direction by the tileset flags)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.1

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries real weight: it discloses the tileset image dependency in img/tilesets, graceful degradation ("sheets without an image are drawn as flat colours and listed"), and automatic downscaling to ~1600px. It does not say how the PNG is returned to the agent (inline image vs. file path on disk), which is the one gap that matters for invocation.

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?

Front-loaded with purpose followed by usage, then supporting detail — a sound ordering. It runs long and the marker colour legend (blue/orange/magenta/green) is dense, but each fragment earns its place by encoding information not present in the schema.

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?

For a 10-parameter, no-annotation, no-output-schema tool, the description covers rendering modes, dependencies, fallbacks and scaling behavior well. The omission is the return contract — an agent cannot tell whether it receives an image payload or a path to the generated file.

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

Parameters4/5

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

Schema coverage is 90%, so the baseline is 3; the description still adds intent the schema cannot: x/y/width/height are for zooming into a region and tileSize should be raised for detail, framing the two parameters as a coupled trade-off. It also explains the marker colour semantics that the showEvents enum values don't convey.

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?

States a specific verb and resource ("Render a map to a PNG image") and immediately names the sibling it is the visual counterpart of: "This is the visual counterpart of render_map (text)". An agent can distinguish render_map_image from render_map, get_map and get_tileset_image without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger sequence: "use it after paint_tiles / create_event / connect_maps to check your work", plus the negative routing to render_map (text) for textual output. Both the when and the alternative are stated rather than inferred.

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