Skip to main content
Glama

generate_map

Create a new RPG Maker MV map file with blank, themed, procedural, template, duplicate, batch, or semantic generation, returning map IDs and event markers.

Instructions

Create a new map file (next free map ID, registered in MapInfos.json; both files written immediately). mode selects the generator: "blank" makes an empty map you paint later (edit_map fill_layer); "themed" generates a simple tile layout for a theme using the tileset's real tiles; "procedural" is the full generator — for themes with matching RTP reference templates (town, dungeon, interior, castle, world, etc.) it CLONES a hand-authored template from the 106 bundled maps (real 3D buildings, walls, furniture), auto-picking the closest size; for themes without templates (beach, swamp, etc.) it generates procedurally (Perlin terrain, BSP dungeons, cellular caves). Same seed + params = same map. Pass templateId to force a specific template, or useTemplate:false to force procedural. 21 themes incl. snow, volcano, sewer, space_interior; "batch" generates several procedural maps in one call from batch specs; "duplicate" copies an existing map (transfer events still point at their ORIGINAL destinations — review them); "template" instantiates one of the 106 bundled reference maps by templateId (list them with get_project_context detail "templates"); "semantic" is the tileset-independent generator — it lays out a MISSION (entrance, key, locked door, treasure, boss, exit, side rooms) as a graph and only then paints it, asking the tileset profile which tile plays each role, so the layout works on ANY tileset including DLC and third-party packs, and the key is always reachable before the door it opens. It returns markers naming the cell of every mission role, which is where to place events next. Run manage_system action "mine_templates" first so the profile comes from tiles this project actually uses; pass a mined templateId (like "mined-3") to re-materialise one of the project OWN maps onto a different tileset instead of generating a new mission. Returns {mapId, ...} — procedural also returns the seed; batch returns all mapIds keyed for edit_map "connect". Fails with an error on unknown theme/template or unwritable files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
loopNomode "semantic": add one extra corridor so the map has a loop instead of being a tree (default true)
modeNoWhich generator to use; see the tool description. Default "procedural"
nameNoInternal map name for the editor tree (required for mode "duplicate")
noteNoFree-form note field for plugin metadata
seedNoprocedural/batch: random seed for reproducible output (omit for random; returned in the result)
batchNomode "batch" only: one spec per map [{key, name, theme, width, height, tilesetId, seed, parentId}]; key is echoed back to match returned mapIds
roomsNomode "semantic": rooms on the critical path (default 5)
themeNoRequired for themed/procedural. themed: forest, dungeon, town, castle, cave, village, swamp, desert, ruins, interior, beach. procedural adds: snow, harbor, volcano, sewer, fortress, magic_forest, magic_interior, space_interior, space_exterior, world
widthNoMap width in tiles (defaults: blank/themed 17, procedural 30; template uses the template's size)
heightNoMap height in tiles (defaults: blank/themed 13, procedural 25)
lockedNomode "semantic": put a key and a locked door on the path (default true when there are 4+ rooms)
bgmNameNoAudio file from audio/bgm/ to autoplay on entry
parentIdNoMap tree folder to nest the new map under (0 = root)
addEventsNoprocedural: also place themed NPCs/chests/bosses/transfers (default true)
keepPropsNomode "semantic" with a mined templateId: paint the original decorations even onto a different tileset (they may not exist there)
sideRoomsNomode "semantic": dead-end rooms hung off the path, the first holding treasure (default 2)
tilesetIdNoTileset to render with. Defaults to the one matching the theme (Outside=2, Inside=3, Dungeon=4, Overworld=1), so you normally omit it — only set it to override. A mismatched tileset renders the map as garbage
encountersNoprocedural combat themes (dungeon/cave/world/fortress/sewer/volcano): auto-populate the map's random encounters from the project's existing troops so enemies appear while walking. Default true (no-op if the project has no troops yet)
keepEventsNomode "template" only: also copy the template's events (default true)
templateIdNomode "template": bundled template ID. mode "procedural": OPTIONAL — force a specific template ID (from get_project_context detail "templates") instead of auto-picking by theme+size
displayNameNoLocation name briefly shown to the player on entry
sourceMapIdNomode "duplicate" only: existing map ID to copy (unchanged by the operation)
useTemplateNoprocedural: when true (default), clone an RTP template for themes that have one (town, dungeon, interior, etc.) instead of generating procedurally. Set false to force procedural generation even when templates exist
enterableHousesNoprocedural town/village only: also auto-generate an interior map per house with a two-way warp (action-button door outside → interior, walk-on mat inside → back to the street). Default true; the new interior map IDs are returned in interiorMapIds

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv5.19.0
    • addedInput schema / properties / keepProps
      Added value: +{
      +  "description": "mode \"semantic\" with a mined templateId: paint the original decorations even onto a different tileset (they may not exist there)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / locked
      Added value: +{
      +  "description": "mode \"semantic\": put a key and a locked door on the path (default true when there are 4+ rooms)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / loop
      Added value: +{
      +  "description": "mode \"semantic\": add one extra corridor so the map has a loop instead of being a tree (default true)",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "blank",
      -  "themed",
      -  "procedural",
      -  "batch",
      -  "duplicate",
      -  "template"
      -]New value: +[
      +  "blank",
      +  "themed",
      +  "procedural",
      +  "batch",
      +  "duplicate",
      +  "template",
      +  "semantic"
      +]
    • addedInput schema / properties / rooms
      Added value: +{
      +  "description": "mode \"semantic\": rooms on the critical path (default 5)",
      +  "type": [
      +    "number",
      +    "string"
      +  ]
      +}
    • addedInput schema / properties / sideRooms
      Added value: +{
      +  "description": "mode \"semantic\": dead-end rooms hung off the path, the first holding treasure (default 2)",
      +  "type": [
      +    "number",
      +    "string"
      +  ]
      +}
  2. Changed2 schema fields changedv5.8.1
    • changedInput schema / properties / templateId / description
      Previous value: -"mode \"template\" only: bundled template ID from get_project_context detail \"templates\""New value: +"mode \"template\": bundled template ID. mode \"procedural\": OPTIONAL — force a specific template ID (from get_project_context detail \"templates\") instead of auto-picking by theme+size"
    • addedInput schema / properties / useTemplate
      Added value: +{
      +  "description": "procedural: when true (default), clone an RTP template for themes that have one (town, dungeon, interior, etc.) instead of generating procedurally. Set false to force procedural generation even when templates exist",
      +  "type": "boolean"
      +}
  3. Addedv5.8.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare non-read-only, non-destructive, non-idempotent behavior, but the description adds substantial context: files are written immediately, registration in MapInfos.json, seed reproducibility, template cloning behavior, transfer-event caveat in duplicate mode, and specific failure conditions. It does not contradict the annotations.

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-loads the core action and then efficiently details modes and parameters. It is dense and long, but the length is justified by the seven modes and 24 parameters; a few thematic examples could be trimmed without loss.

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

Completeness5/5

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

With no output schema, the description still explains return shapes for each mode (mapId, seed, batch mapIds, markers, interiorMapIds) and specifies error behavior. Combined with annotations and the complete input schema, an agent has enough to invoke it correctly.

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 description coverage is 100%, so the baseline is 3. The description adds some cross-parameter meaning and defaults beyond the schema, especially around mode semantics and reproducibility, but much of the per-parameter detail is already covered by the rich schema descriptions.

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: 'Create a new map file,' with seven generator modes clearly differentiated. It explicitly names sibling tools for related tasks (edit_map fill_layer, get_project_context templates, manage_system mine_templates), so an agent can select it over alternatives without opening schemas.

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 explicit mode-selection conditions and alternatives: blank maps are painted later with edit_map, template listing uses get_project_context, and mine_templates should run first for semantic generation. It also explains when to override defaults (templateId, useTemplate:false) and when procedural fallback applies.

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