Skip to main content
Glama
garuh143

RPG Maker MZ/MV MCP Server

by garuh143

create_map

Generate new maps for RPG Maker MZ/MV projects by specifying dimensions, tilesets, scroll behavior, and other properties to build game environments.

Instructions

Create a new map with specified dimensions and properties. Returns the new map ID and map data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoMap name as shown in the editor (e.g. "Fantasy City"). Defaults to "MAP{NNN}"
widthNoMap width in tiles (default: 17)
heightNoMap height in tiles (default: 13)
displayNameNoDisplay name shown to the player when entering the map
tilesetIdNoTileset ID to use. 1=Overworld, 2=Outside, 3=Inside, 4=Dungeon, 5=SF Outside, 6=SF Inside (default: 2)
scrollTypeNoScroll type: 0=No Loop, 1=Loop Vertically, 2=Loop Horizontally, 3=Loop Both (default: 0)
disableDashingNoWhether to disable dashing on this map (default: false)
encounterStepNoSteps between random encounters, 0 to disable (default: 30)
noteNoNote field for plugin metadata or comments
parentIdNoParent map ID in the editor hierarchy. 0 = root level (default: 0)

Implementation Reference

  • The 'createMap' function in src/tools/mapTools.ts implements the tool logic for creating a new map in the project.
    export async function createMap(
      projectPath: string,
      options: {
        displayName?: string;
        width?: number;
        height?: number;
        tilesetId?: number;
        scrollType?: number;
        disableDashing?: boolean;
        encounterStep?: number;
        note?: string;
        parentId?: number;
        name?: string;
      } = {}
    ): Promise<{ mapId: number; map: MapData }> {
      const width = options.width || 17;
      const height = options.height || 13;
      const tilesetId = options.tilesetId || 1;
      const displayName = options.displayName || '';
      const scrollType = options.scrollType || 0;
      const disableDashing = options.disableDashing || false;
      const encounterStep = options.encounterStep || 30;
      const note = options.note || '';
      const parentId = options.parentId !== undefined ? options.parentId : 0;
      const mapName = options.name || '';
    
      // Find next available map ID
      const mapId = await getNextMapId(projectPath);
    
      // Create the data array (width * height * 6 layers, all zeros)
      const data = new Array(width * height * 6).fill(0);
    
      // Build the map object
      const map: MapData = {
        autoplayBgm: false,
        autoplayBgs: false,
        battleback1Name: '',
        battleback2Name: '',
        bgm: { name: '', pan: 0, pitch: 100, volume: 90 },
        bgs: { name: '', pan: 0, pitch: 100, volume: 90 },
        disableDashing,
        displayName,
        encounterList: [],
        encounterStep,
        height,
        width,
        parallaxLoopX: false,
        parallaxLoopY: false,
        parallaxName: '',
        parallaxShow: true,
        parallaxSx: 0,
        parallaxSy: 0,
        scrollType,
        specifyBattleback: false,
        tilesetId,
        data,
        events: [null],
        ...(note ? { note } : {}),
      };
    
      // Write the map file
      const mapPath = getMapPath(projectPath, mapId);
      await writeJsonFile(mapPath, map);
    
      // Update MapInfos.json to register the new map
      const mapInfosPath = getDataPath(projectPath, 'MapInfos.json');
  • The 'create_map' tool definition and schema are registered in src/index.ts within the tool list.
      name: 'create_map',
      description: 'Create a new map with specified dimensions and properties. Returns the new map ID and map data.',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: 'Map name as shown in the editor (e.g. "Fantasy City"). Defaults to "MAP{NNN}"',
          },
          width: {
            type: 'number',
            description: 'Map width in tiles (default: 17)',
          },
          height: {
            type: 'number',
            description: 'Map height in tiles (default: 13)',
          },
          displayName: {
            type: 'string',
            description: 'Display name shown to the player when entering the map',
          },
          tilesetId: {
            type: 'number',
            description: 'Tileset ID to use. 1=Overworld, 2=Outside, 3=Inside, 4=Dungeon, 5=SF Outside, 6=SF Inside (default: 2)',
          },
          scrollType: {
            type: 'number',
            description: 'Scroll type: 0=No Loop, 1=Loop Vertically, 2=Loop Horizontally, 3=Loop Both (default: 0)',
          },
          disableDashing: {
            type: 'boolean',
            description: 'Whether to disable dashing on this map (default: false)',
          },
          encounterStep: {
            type: 'number',
            description: 'Steps between random encounters, 0 to disable (default: 30)',
          },
          note: {
            type: 'string',
            description: 'Note field for plugin metadata or comments',
          },
          parentId: {
            type: 'number',
            description: 'Parent map ID in the editor hierarchy. 0 = root level (default: 0)',
          },
        },
      },
    },
  • src/index.ts:756-757 (registration)
    The 'create_map' tool is handled in the 'executeToolFunction' method in src/index.ts, which delegates to the 'mapTools.createMap' handler.
    case 'create_map':
      return await mapTools.createMap(this.projectPath, args);
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adequately states that the tool returns the new map ID and map data, but lacks details on side effects, error conditions (e.g., invalid dimension limits), or whether the creation is idempotent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description consists of two efficient sentences with zero waste. The first states the action and inputs, the second states the return values—appropriately front-loaded and sized.

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

Completeness3/5

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

While the description compensates for the missing output schema by stating what is returned, it fails to note that all 10 parameters are optional (0 required), which is critical context for an agent deciding whether to supply values. Given the rich schema, this omission keeps it from being fully complete.

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?

With 100% schema coverage, the baseline is 3. The description adds semantic value by grouping the 10 parameters into 'dimensions and properties,' providing conceptual organization beyond the raw schema definitions.

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

Purpose4/5

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

The description uses a specific verb ('Create') and resource ('map') and mentions key attributes ('dimensions and properties'). However, it does not explicitly distinguish from the sibling tool 'create_map_event' which creates entities on maps rather than the map container itself.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like 'paint_map' (which modifies existing maps) or 'get_map' (for reading). There is no mention of prerequisites, such as requiring a valid tilesetId to be available.

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/garuh143/RPG-MakerMV-MCP'

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