Skip to main content
Glama

add_actor

Create new characters in RPG Maker MZ by adding actors to the game database with specified IDs and names for your project.

Instructions

Add a new actor to the database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesActor ID
nameYesActor name
project_pathYesPath to the RPG Maker MZ project directory

Implementation Reference

  • The core handler function that executes the add_actor tool logic: reads Actors.json, inserts default actor at given ID with name, writes back, returns success.
    export async function addActor(projectPath: string, id: number, name: string) { const actorsPath = path.join(projectPath, "data", "Actors.json"); const actorsContent = await fs.readFile(actorsPath, "utf-8"); const actors = JSON.parse(actorsContent); actors[id] = getDefaultActor(id, name); await fs.writeFile(actorsPath, JSON.stringify(actors, null, 0), "utf-8"); return { success: true, id }; }
  • src/index.ts:1206-1214 (registration)
    MCP tool call handler registration: parses arguments and calls the addActor implementation function.
    case "add_actor": { const projectPath = args.project_path as string; const id = args.id as number; const name = args.name as string; const result = await addActor(projectPath, id, name); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }
  • Tool schema definition in listTools response, specifying input parameters and validation for add_actor tool.
    { name: "add_actor", description: "Add a new actor to the database", inputSchema: { type: "object", properties: { project_path: { type: "string", description: "Path to the RPG Maker MZ project directory", }, id: { type: "number", description: "Actor ID", }, name: { type: "string", description: "Actor name", }, }, required: ["project_path", "id", "name"], }, },
  • src/index.ts:11-22 (registration)
    Import statement that brings the addActor handler into the MCP server scope.
    createNewProject, createMap, updateMapTile, addEvent, updateEvent, addEventCommand, addActor, addClass, addSkill, addItem, updateDatabase } from "./game-creation-tools.js";

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