Skip to main content
Glama
garuh143

RPG Maker MZ/MV MCP Server

by garuh143

paint_map

Paint tiles on RPG Maker maps using batch operations to create terrain, roads, walls, and decorations efficiently with single read/write cycles.

Instructions

Paint tiles on a map using batch operations (fill rectangles or draw outlines). Efficient for creating terrain, roads, walls, and decorations in one call. Reads/writes map data only once regardless of operation count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mapIdYesThe ID of the map to paint
operationsYesArray of paint operations. Each paints a rectangular area.

Implementation Reference

  • Implementation of the paintMap function which batch paints tiles on a map.
    export async function paintMap(
      projectPath: string,
      mapId: number,
      operations: PaintOperation[]
    ): Promise<{ painted: number }> {
      const map = await getMap(projectPath, mapId);
      let painted = 0;
    
      for (const op of operations) {
        const { x1, y1, x2, y2, layer, tileId } = op;
        const isOutline = op.type === 'outline';
    
        // Bounds check
        const cx1 = Math.max(0, Math.min(x1, x2));
        const cy1 = Math.max(0, Math.min(y1, y2));
        const cx2 = Math.min(map.width - 1, Math.max(x1, x2));
        const cy2 = Math.min(map.height - 1, Math.max(y1, y2));
    
        if (layer < 0 || layer > 5) continue;
    
        for (let y = cy1; y <= cy2; y++) {
          for (let x = cx1; x <= cx2; x++) {
            if (isOutline && x !== cx1 && x !== cx2 && y !== cy1 && y !== cy2) continue;
            const index = (layer * map.height + y) * map.width + x;
            map.data[index] = tileId;
            painted++;
          }
        }
      }
    
      const mapPath = getMapPath(projectPath, mapId);
      await writeJsonFile(mapPath, map);
    
      return { painted };
    }
  • Input schema definition for paintMap operations.
    export interface PaintOperation {
      type?: 'fill' | 'outline';
      x1: number;
      y1: number;
      x2: number;
      y2: number;
      layer: number;
      tileId: number;
    }
Behavior3/5

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

Discloses write operation ('Reads/writes map data') and atomicity/performance trait ('only once regardless of operation count'). Without annotations, description carries full burden but omits error handling, partial failure behavior, permission requirements, and return value details expected for mutation tools.

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?

Three sentences with zero waste: defines operation, states use cases, explains performance characteristic. Appropriately sized and front-loaded for the complexity level.

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?

Adequate for the tool's purpose but gaps remain: no output schema exists yet description omits return behavior, success indicators, or error handling for the complex nested input structure. Complex mutation tools warrant more behavioral disclosure.

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

Parameters3/5

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

Schema coverage is 100%, establishing baseline 3. Description adds domain context ('fill rectangles or draw outlines') bridging to the 'type' enum values, but does not supplement parameter syntax, validation constraints, or tileId value semantics beyond the schema's documentation.

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?

Clear specific verb ('Paint') + resource ('tiles on a map') + method ('batch operations'). Explicitly distinguishes from siblings like create_map (makes new maps) or update_map_event (modifies events) by focusing on tile painting operations.

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

Usage Guidelines4/5

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

Provides clear use cases ('terrain, roads, walls, decorations') and efficiency guidance ('in one call'). Lacks explicit 'when not to use' guidance or comparison to individual tile update alternatives, though batch efficiency implies appropriate usage patterns.

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