Skip to main content
Glama

analyze_project_structure

Analyze RPG Maker MZ project structure to identify maps, connections, events, and game flow patterns for development insights.

Instructions

Analyze RPG Maker MZ project structure and provide insights about maps, connections, events, and game flow

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYesPath to the RPG Maker MZ project directory

Implementation Reference

  • Handler implementation for the analyze_project_structure MCP tool. Analyzes RPG Maker MZ project by reading MapInfos.json, computing map counts, hierarchy based on parentId, total events, and events per map, then returns a markdown analysis report.
    case "analyze_project_structure": { const projectPath = args.project_path as string; let analysis = "# Project Structure Analysis\n\n"; try { const mapsFile = path.join(projectPath, "data", "MapInfos.json"); const mapsContent = await fs.readFile(mapsFile, "utf-8"); const maps = JSON.parse(mapsContent); const mapCount = Object.values(maps).filter((m) => m !== null).length; analysis += `## Overview\n- Total Maps: ${mapCount}\n\n`; analysis += "## Map Hierarchy\n"; for (const [id, mapInfo] of Object.entries(maps)) { if (mapInfo && typeof mapInfo === "object" && "name" in mapInfo) { const parentId = "parentId" in mapInfo ? mapInfo.parentId : 0; const indent = parentId === 0 ? "" : " "; analysis += `${indent}- ${mapInfo.name} (ID: ${id})\n`; } } analysis += "\n"; // Event analysis let totalEvents = 0; const eventsByMap: Record<string, number> = {}; for (const [id, mapInfo] of Object.entries(maps)) { if (mapInfo && typeof mapInfo === "object" && "name" in mapInfo) { try { const mapFile = path.join(projectPath, "data", `Map${String(id).padStart(3, "0")}.json`); const mapContent = await fs.readFile(mapFile, "utf-8"); const mapData = JSON.parse(mapContent); const eventCount = mapData.events?.filter((e: any) => e !== null).length || 0; totalEvents += eventCount; if (eventCount > 0) { eventsByMap[mapInfo.name as string] = eventCount; } } catch { // Skip } } } analysis += `## Event Statistics\n- Total Events: ${totalEvents}\n\n`; if (Object.keys(eventsByMap).length > 0) { analysis += "### Events by Map\n"; for (const [mapName, count] of Object.entries(eventsByMap)) { analysis += `- ${mapName}: ${count} events\n`; } } } catch (e) { analysis += "Error analyzing project structure\n"; } return { content: [ { type: "text", text: analysis, }, ], }; }
  • src/index.ts:180-193 (registration)
    Tool registration entry in the MCP server's listTools response, defining the name, description, and input schema for analyze_project_structure.
    { name: "analyze_project_structure", description: "Analyze RPG Maker MZ project structure and provide insights about maps, connections, events, and game flow", inputSchema: { type: "object", properties: { project_path: { type: "string", description: "Path to the RPG Maker MZ project directory", }, }, required: ["project_path"], }, },
  • Input schema definition for the analyze_project_structure tool, specifying the required project_path parameter.
    inputSchema: { type: "object", properties: { project_path: { type: "string", description: "Path to the RPG Maker MZ project directory", }, }, required: ["project_path"], },

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/ShunsukeHayashi/rpgmaker-mz-mcp'

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