{"at":"2026-11-23T05:28:32.578Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T05:28:33.138Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T05:28:33.238Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T05:28:33.807Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"completions":{},"prompts":{"listChanged":true},"resources":{"listChanged":true},"tools":{"listChanged":true}},"protocolVersion":"2025-11-25","serverInfo":{"name":"rpgmaker-mv-mcp","version":"0.5.1"}}}}
{"at":"2026-11-23T05:28:33.807Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T05:28:33.807Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T05:28:33.818Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"Select the RPG Maker MV project folder to work on (the folder containing Game.rpgproject and data/). Must be called before other tools unless the server was started with --project. Discards any open changeset (its staged edits are lost).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"path":{"description":"Absolute path to the RPG Maker MV project folder","type":"string"}},"required":["path"],"type":"object"},"name":"set_project","title":"Set project"},{"description":"Summary of the current project: game title, database record counts, map count, and plugin count.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"get_project_info","title":"Get project info"},{"description":"List all records of a database type as {id, name} summaries. Use get_record for full data.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"type":{"description":"Which database to access (e.g. actors, items, skills, troops, commonEvents)","enum":["actors","classes","skills","items","weapons","armors","enemies","troops","states","animations","tilesets","commonEvents"],"type":"string"}},"required":["type"],"type":"object"},"name":"list_records","title":"List database records"},{"description":"Get the full JSON of one database record by id.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"id":{"description":"Record id (1-based)","minimum":1,"type":"integer"},"type":{"description":"Which database to access (e.g. actors, items, skills, troops, commonEvents)","enum":["actors","classes","skills","items","weapons","armors","enemies","troops","states","animations","tilesets","commonEvents"],"type":"string"}},"required":["type","id"],"type":"object"},"name":"get_record","title":"Get database record"},{"description":"Update a database record. By default the given fields are shallow-merged into the existing record; set merge=false to replace it entirely. The record's id always stays fixed to match its array position.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"data":{"additionalProperties":{},"description":"Fields to set (or the complete record when merge=false)","type":"object"},"id":{"description":"Record id (1-based)","minimum":1,"type":"integer"},"merge":{"default":true,"description":"Merge into existing record (true) or replace (false)","type":"boolean"},"type":{"description":"Which database to access (e.g. actors, items, skills, troops, commonEvents)","enum":["actors","classes","skills","items","weapons","armors","enemies","troops","states","animations","tilesets","commonEvents"],"type":"string"}},"required":["type","id","data"],"type":"object"},"name":"update_record","title":"Update database record"},{"description":"Append a new record to a database. The new record's fields are copied from `data`; missing fields should be filled in to match the shape of existing records (fetch one with get_record as a template first). Returns the new id.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"data":{"additionalProperties":{},"description":"The record fields (id is assigned automatically)","type":"object"},"type":{"description":"Which database to access (e.g. actors, items, skills, troops, commonEvents)","enum":["actors","classes","skills","items","weapons","armors","enemies","troops","states","animations","tilesets","commonEvents"],"type":"string"}},"required":["type","data"],"type":"object"},"name":"create_record","title":"Create database record"},{"description":"Read System.json (game title, starting party/position, terms, sounds, switches, variables, etc.). Optionally return only one top-level key.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"key":{"description":"Optional top-level key to return (e.g. 'switches', 'variables', 'terms')","type":"string"}},"type":"object"},"name":"get_system","title":"Get System.json"},{"description":"Set the editor name of a game switch in System.json (e.g. switch 5 = 'Opened Chest'). The switches array grows if the id is beyond its current size.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"id":{"description":"Switch id (1-based)","minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"name":"set_switch_name","title":"Name a switch"},{"description":"Set the editor name of a game variable in System.json (e.g. variable 3 = 'Quest Progress'). The variables array grows if the id is beyond its current size.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"id":{"description":"Variable id (1-based)","minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"name":"set_variable_name","title":"Name a variable"},{"description":"Shallow-merge the given top-level fields into System.json (e.g. gameTitle, startMapId, startX, startY, switches, variables).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"data":{"additionalProperties":{},"description":"Top-level System.json fields to set","type":"object"}},"required":["data"],"type":"object"},"name":"update_system","title":"Update System.json"},{"description":"List all maps from MapInfos.json as {id, name, parentId, order}.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"list_maps","title":"List maps"},{"description":"Read a map's properties (size, tileset, music, encounters, notes) and event summaries. Tile data is omitted unless includeTileData=true (it is large: width*height*6 integers).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"includeTileData":{"default":false,"type":"boolean"},"mapId":{"minimum":1,"type":"integer"}},"required":["mapId"],"type":"object"},"name":"get_map","title":"Get map"},{"description":"Shallow-merge fields into a map's JSON (e.g. displayName, note, bgm, encounterList). Refuses to touch 'data' or 'events' — use the event tools for events and paint_tiles for tiles. To switch tilesets prefer set_map_tileset.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"data":{"additionalProperties":{},"description":"Map property fields to set","type":"object"},"mapId":{"minimum":1,"type":"integer"}},"required":["mapId","data"],"type":"object"},"name":"update_map","title":"Update map properties"},{"description":"Get the full JSON of one event on a map, including all pages and command lists.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"eventId":{"minimum":1,"type":"integer"},"mapId":{"minimum":1,"type":"integer"}},"required":["mapId","eventId"],"type":"object"},"name":"get_event","title":"Get map event"},{"description":"Replace an event on a map with the given event JSON (same shape as returned by get_event). The event's id and its array position stay in sync automatically. See event_command_reference for command codes.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"event":{"additionalProperties":{},"description":"Complete event object (name, x, y, note, pages)","type":"object"},"eventId":{"minimum":1,"type":"integer"},"mapId":{"minimum":1,"type":"integer"}},"required":["mapId","eventId","event"],"type":"object"},"name":"update_event","title":"Update map event"},{"description":"Add a new event to a map at (x, y). If no pages are given, a single empty page (action-button trigger, no commands) is created. Returns the new event id.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"mapId":{"minimum":1,"type":"integer"},"name":{"type":"string"},"note":{"default":"","type":"string"},"pages":{"description":"Optional event pages; defaults to one empty page","items":{"additionalProperties":{},"type":"object"},"type":"array"},"x":{"minimum":0,"type":"integer"},"y":{"minimum":0,"type":"integer"}},"required":["mapId","name","x","y"],"type":"object"},"name":"create_event","title":"Create map event"},{"description":"Delete an event from a map. The slot is set to null so other event ids are unaffected (matches editor behavior).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"eventId":{"minimum":1,"type":"integer"},"mapId":{"minimum":1,"type":"integer"}},"required":["mapId","eventId"],"type":"object"},"name":"delete_event","title":"Delete map event"},{"description":"Insert commands into an event page's command list without resending the whole event. Commands are inserted before the page's terminating {code: 0} entry (or at `index` if given). Multi-line constructs work naturally, e.g. Show Text is one code-101 command followed by code-401 commands. See event_command_reference for codes.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"commands":{"description":"Commands to insert, in order","items":{"additionalProperties":false,"properties":{"code":{"description":"Event command code","type":"integer"},"indent":{"default":0,"minimum":0,"type":"integer"},"parameters":{"default":[],"items":{},"type":"array"}},"required":["code"],"type":"object"},"minItems":1,"type":"array"},"eventId":{"minimum":1,"type":"integer"},"index":{"description":"Position in the list to insert at; defaults to the end (before the terminator)","minimum":0,"type":"integer"},"mapId":{"minimum":1,"type":"integer"},"pageIndex":{"default":0,"description":"Which event page (0-based)","minimum":0,"type":"integer"}},"required":["mapId","eventId","commands"],"type":"object"},"name":"add_event_command","title":"Add event commands"},{"description":"Add spoken dialogue to an event page in one call — builds the Show Text (101) and text-line (401) commands automatically, splitting into multiple message boxes every 4 lines. Inserted before the page's end, like add_event_command.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"background":{"default":0,"description":"0 window, 1 dim, 2 transparent","maximum":2,"minimum":0,"type":"integer"},"eventId":{"minimum":1,"type":"integer"},"faceIndex":{"default":0,"maximum":7,"minimum":0,"type":"integer"},"faceName":{"default":"","description":"Face image file (e.g. 'Actor1'), empty for none","type":"string"},"lines":{"description":"Dialogue lines (a new message box starts every 4 lines)","items":{"type":"string"},"minItems":1,"type":"array"},"mapId":{"minimum":1,"type":"integer"},"pageIndex":{"default":0,"minimum":0,"type":"integer"},"position":{"default":2,"description":"0 top, 1 middle, 2 bottom","maximum":2,"minimum":0,"type":"integer"}},"required":["mapId","eventId","lines"],"type":"object"},"name":"add_dialogue","title":"Add dialogue"},{"description":"Create a new map: writes MapXXX.json and registers it in MapInfos.json. The map starts empty unless `fill` is given (a ground tile for layer 0); afterwards use paint_tiles to paint it, get_tileset_info to choose tiles and add events with the event tools. Returns the new map id.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"fill":{"anyOf":[{"maximum":8191,"minimum":0,"type":"integer"},{"additionalProperties":false,"properties":{"index":{"description":"Tile index, for sheets A5 (0-127) and B-E (0-255)","type":"integer"},"kind":{"description":"Autotile kind, for sheets A1-A4 (A1 0-15, A2 16-47, A3 48-79, A4 80-127)","type":"integer"},"sheet":{"enum":["A1","A2","A3","A4","A5","B","C","D","E"],"type":"string"}},"required":["sheet"],"type":"object"}],"description":"Optional tile to fill layer 0 with, e.g. {sheet:'A2', kind:16} for grass"},"height":{"default":13,"maximum":256,"minimum":1,"type":"integer"},"name":{"type":"string"},"parentId":{"default":0,"description":"Parent map id in the editor tree (0 = top level)","minimum":0,"type":"integer"},"tilesetId":{"default":1,"minimum":1,"type":"integer"},"width":{"default":17,"maximum":256,"minimum":1,"type":"integer"}},"required":["name"],"type":"object"},"name":"create_map","title":"Create map"},{"description":"Reference table of RPG Maker MV event command codes and their parameters. Consult this before writing or editing event command lists.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"event_command_reference","title":"Event command reference"},{"description":"Describe a tileset so you can choose tiles to paint: which image is assigned to each sheet (A1-A5, B-E), the tile id ranges, and for autotile sheets every kind with its type, position on the sheet image and passability. Without `sheet` you get an overview; pass `sheet` for the detail of one sheet (for A5/B-E that includes a passability grid laid out like the image: o passable, x blocked, * drawn above characters, p partly blocked). Use get_tileset_image to see what the tiles look like. `tileIds` decodes passability and terrain flags for specific tile ids.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"sheet":{"description":"Return the detail of one sheet","enum":["A1","A2","A3","A4","A5","B","C","D","E"],"type":"string"},"tileIds":{"items":{"maximum":8191,"minimum":0,"type":"integer"},"maxItems":100,"type":"array"},"tilesetId":{"description":"Tileset id (a map's tilesetId, see get_map)","minimum":1,"type":"integer"}},"required":["tilesetId"],"type":"object"},"name":"get_tileset_info","title":"Get tileset info"},{"description":"Return one tileset sheet (A1-A5, B-E) as an image so you can see which tile looks like what, together with its grid layout (48px tiles). Use get_tileset_info for the matching tile ids and kinds.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"sheet":{"enum":["A1","A2","A3","A4","A5","B","C","D","E"],"type":"string"},"tilesetId":{"minimum":1,"type":"integer"}},"required":["tilesetId","sheet"],"type":"object"},"name":"get_tileset_image","title":"Get tileset sheet image"},{"description":"Switch a map to another tileset (which sheets/tile images it uses). Existing tile ids are kept as they are, so they will show the new tileset's graphics - repaint with paint_tiles if the layouts differ.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"mapId":{"minimum":1,"type":"integer"},"tilesetId":{"minimum":1,"type":"integer"}},"required":["mapId","tilesetId"],"type":"object"},"name":"set_map_tileset","title":"Set map tileset"},{"description":"Paint tiles onto a map. Takes a list of operations applied in order: `cells` (individual positions), `rect` (filled or hollow rectangle) and `fill` (flood fill from a cell). Tiles are chosen as {sheet:'A2', kind:N} (autotile sheets A1-A4), {sheet:'B', index:N} (A5/B-E) or a raw tile id; 0 erases. Autotile edge, corner and wall shapes are calculated automatically, including re-shaping neighbours, just like painting in the editor. Layers: 0-1 ground, 2-3 upper tiles, 4 shadows, 5 regions. Typical map: fill layer 0 with a ground kind from A2, then place water/walls/objects on top. Use get_tileset_info / get_tileset_image to pick tiles and render_map to check the result.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"mapId":{"minimum":1,"type":"integer"},"operations":{"items":{"anyOf":[{"additionalProperties":false,"properties":{"cells":{"items":{"additionalProperties":false,"properties":{"x":{"type":"integer"},"y":{"type":"integer"}},"required":["x","y"],"type":"object"},"minItems":1,"type":"array"},"layer":{"description":"Map layer: 0-1 ground tiles, 2-3 upper tiles, 4 shadow bits (0-15), 5 region id (0-255). Defaults to 0 for sheets A1-A5 and 2 for B-E; required when erasing.","maximum":5,"minimum":0,"type":"integer"},"tile":{"anyOf":[{"maximum":8191,"minimum":0,"type":"integer"},{"additionalProperties":false,"properties":{"index":{"description":"Tile index, for sheets A5 (0-127) and B-E (0-255)","type":"integer"},"kind":{"description":"Autotile kind, for sheets A1-A4 (A1 0-15, A2 16-47, A3 48-79, A4 80-127)","type":"integer"},"sheet":{"enum":["A1","A2","A3","A4","A5","B","C","D","E"],"type":"string"}},"required":["sheet"],"type":"object"}],"description":"Which tile to place. Either {sheet, kind} for autotile sheets A1-A4, {sheet, index} for A5/B/C/D/E, or a raw tile id (0 erases). Autotile edge shapes are computed automatically."},"type":{"const":"cells","type":"string"}},"required":["type","tile","cells"],"type":"object"},{"additionalProperties":false,"properties":{"height":{"minimum":1,"type":"integer"},"hollow":{"default":false,"description":"Only paint the outline of the rectangle","type":"boolean"},"layer":{"$ref":"#/properties/operations/items/anyOf/0/properties/layer"},"tile":{"$ref":"#/properties/operations/items/anyOf/0/properties/tile"},"type":{"const":"rect","type":"string"},"width":{"minimum":1,"type":"integer"},"x":{"type":"integer"},"y":{"type":"integer"}},"required":["type","tile","x","y","width","height"],"type":"object"},{"additionalProperties":false,"properties":{"layer":{"$ref":"#/properties/operations/items/anyOf/0/properties/layer"},"tile":{"$ref":"#/properties/operations/items/anyOf/0/properties/tile"},"type":{"const":"fill","type":"string"},"x":{"type":"integer"},"y":{"type":"integer"}},"required":["type","tile","x","y"],"type":"object"}]},"maxItems":500,"minItems":1,"type":"array"}},"required":["mapId","operations"],"type":"object"},"name":"paint_tiles","title":"Paint map tiles"},{"description":"Show a map's tiles as text so you can check what you painted. mode 'symbols' (default) draws one character per cell using the topmost tile of layers 0-3 (or only `layer`) with a legend naming each symbol; mode 'ids' prints raw tile ids of one layer. Use x/y/width/height to look at a region (default: up to 100x60 from the top-left).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"height":{"minimum":1,"type":"integer"},"layer":{"maximum":5,"minimum":0,"type":"integer"},"mapId":{"minimum":1,"type":"integer"},"mode":{"default":"symbols","enum":["symbols","ids"],"type":"string"},"width":{"minimum":1,"type":"integer"},"x":{"default":0,"minimum":0,"type":"integer"},"y":{"default":0,"minimum":0,"type":"integer"}},"required":["mapId"],"type":"object"},"name":"render_map","title":"Render map as text"},{"description":"Render a map to a PNG image so you can SEE what it looks like: all tile layers with correct autotile shapes, shadows and tiles that draw above characters, optionally the events' character sprites, coloured event markers with their ids, region ids, a tile grid and a passability overlay (red = blocked in at least one direction). This is the visual counterpart of render_map (text) - use it after paint_tiles / create_event / connect_maps to check your work. Marker colours: blue = event with a Transfer Player command (door/exit), orange = shows text, magenta = autorun/parallel, green = anything else. Needs the tileset images in img/tilesets (sheets without an image are drawn as flat colours and listed). Large maps are shrunk to fit ~1600px; pass x/y/width/height to zoom into a region and raise tileSize for detail.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"height":{"description":"Region height in tiles (default: to the map's bottom edge)","minimum":1,"type":"integer"},"mapId":{"minimum":1,"type":"integer"},"showEvents":{"default":"both","description":"Draw event character sprites, coloured id markers, both, or neither","enum":["none","markers","sprites","both"],"type":"string"},"showGrid":{"default":false,"description":"Overlay a tile grid","type":"boolean"},"showPassability":{"default":false,"description":"Tint blocked cells translucent red (blocked in at least one direction by the tileset flags)","type":"boolean"},"showRegions":{"default":false,"description":"Overlay region ids (layer 5)","type":"boolean"},"tileSize":{"default":24,"description":"Pixels per map tile (48 = full resolution). Reduced automatically so the image stays under ~1600px","maximum":48,"minimum":4,"type":"integer"},"width":{"description":"Region width in tiles (default: to the map's right edge)","minimum":1,"type":"integer"},"x":{"default":0,"description":"Region left edge in tiles","minimum":0,"type":"integer"},"y":{"default":0,"description":"Region top edge in tiles","minimum":0,"type":"integer"}},"required":["mapId"],"type":"object"},"name":"render_map_image","title":"Render map as image"},{"description":"Show what changed on a map compared with an earlier version: a text summary (changed tile cells, added/removed/moved/edited events) plus a PNG of the CURRENT map with changed cells outlined yellow and added or moved events outlined green. By default it compares with the most recent backup session that contains the map (the state before this session's first edit); pass against.session to pick a session folder from list_backups, or against.changeset to compare with the pre-image of a committed changeset. Use it after bulk painting or generation to review exactly what you touched. If the map has no earlier version this session, it says so.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"against":{"additionalProperties":false,"description":"Which earlier version to compare with (default: the most recent backup session containing this map)","properties":{"changeset":{"description":"Changeset id; compares with its pre-edit copy of the map","type":"string"},"session":{"description":"Backup session folder name (see list_backups)","type":"string"}},"type":"object"},"mapId":{"minimum":1,"type":"integer"},"tileSize":{"default":24,"description":"Pixels per map tile; reduced automatically so the image stays under ~1600px","maximum":48,"minimum":4,"type":"integer"}},"required":["mapId"],"type":"object"},"name":"render_diff","title":"Render map changes"},{"description":"List all plugins registered in js/plugins.js with status and parameters.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"list_plugins","title":"List plugins"},{"description":"Enable/disable a registered plugin and/or merge new values into its parameters (parameter values are always strings in RPG Maker MV).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"name":{"description":"Plugin name as it appears in list_plugins","type":"string"},"parameters":{"additionalProperties":{"type":"string"},"description":"Parameter values to merge into the plugin's parameters","type":"object"},"status":{"description":"true = enabled, false = disabled","type":"boolean"}},"required":["name"],"type":"object"},"name":"configure_plugin","title":"Configure plugin"},{"description":"Register an existing js/plugins/<name>.js file in the plugin list. Fails if the file does not exist (use create_plugin to make a new one).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"description":{"default":"","type":"string"},"name":{"type":"string"},"parameters":{"additionalProperties":{"type":"string"},"default":{},"type":"object"},"status":{"default":true,"type":"boolean"}},"required":["name"],"type":"object"},"name":"add_plugin","title":"Register plugin"},{"description":"Remove a plugin from js/plugins.js. The plugin's .js file is NOT deleted.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"name":{"type":"string"}},"required":["name"],"type":"object"},"name":"remove_plugin","title":"Unregister plugin"},{"description":"Create a new plugin file in js/plugins/ and register it. If no code is given, a standard MV plugin scaffold (with @plugindesc header) is written. Fails if the file already exists.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"code":{"description":"Full JavaScript source; omit for a scaffold","type":"string"},"description":{"default":"","type":"string"},"name":{"description":"Plugin file name without .js","type":"string"},"status":{"default":true,"type":"boolean"}},"required":["name"],"type":"object"},"name":"create_plugin","title":"Create plugin"},{"description":"Read the JavaScript source of js/plugins/<name>.js.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"name":{"type":"string"}},"required":["name"],"type":"object"},"name":"read_plugin","title":"Read plugin source"},{"description":"Overwrite the JavaScript source of an existing js/plugins/<name>.js.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"code":{"description":"Complete new file contents","type":"string"},"name":{"type":"string"}},"required":["name","code"],"type":"object"},"name":"write_plugin","title":"Write plugin source"},{"description":"Start a playtest of the current project. mode 'nwjs' launches the game with an NW.js runtime (pass runtimePath, e.g. the Game.exe inside the RPG Maker MV install's nwjs-win folder) and captures its stdout/stderr. mode 'browser' serves the project over a local HTTP server and returns a URL to open. Any previous playtest is stopped first.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"mode":{"default":"browser","enum":["nwjs","browser"],"type":"string"},"port":{"default":8321,"description":"Port for browser mode","maximum":65535,"minimum":1024,"type":"integer"},"runtimePath":{"description":"Path to NW.js executable. If omitted in nwjs mode, common install locations (Steam, KADOKAWA, the project's own Game.exe, $RPGMAKER_MV_NWJS) are probed automatically.","type":"string"}},"type":"object"},"name":"playtest_start","title":"Start playtest"},{"description":"Whether a playtest is running, in which mode, and its URL/PID.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"playtest_status","title":"Playtest status"},{"description":"Recent stdout/stderr lines from an NW.js playtest process.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"tail":{"default":50,"description":"Number of lines from the end","maximum":500,"minimum":1,"type":"integer"}},"type":"object"},"name":"playtest_log","title":"Playtest log"},{"description":"Stop the running playtest process and/or HTTP server.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"playtest_stop","title":"Stop playtest"},{"description":"Create a complete damaging skill in one call. The formula uses MV damage syntax where `a` is the user and `b` the target, e.g. 'a.mat * 4 - b.mdf * 2' or 'a.atk * 2 - b.def'. Returns the new skill id.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"animationId":{"default":0,"description":"Animation id from the Animations database (0 = none, -1 = normal attack)","minimum":-1,"type":"integer"},"critical":{"default":true,"description":"Can critically hit","type":"boolean"},"damageType":{"default":"hp","description":"What the damage hits (drain variants absorb into the user)","enum":["hp","mp","hp_drain","mp_drain"],"type":"string"},"description":{"default":"","description":"Two-line description shown in menus","type":"string"},"elementId":{"default":0,"description":"Element id from System types (0 = none, -1 = normal attack element)","minimum":-1,"type":"integer"},"formula":{"description":"Damage formula, e.g. 'a.mat * 4 - b.mdf * 2'","type":"string"},"hitType":{"default":"magical","description":"Hit type (affects evasion/reflection rules)","enum":["certain","physical","magical"],"type":"string"},"iconIndex":{"default":0,"description":"Icon sheet index","minimum":0,"type":"integer"},"mpCost":{"default":0,"minimum":0,"type":"integer"},"name":{"type":"string"},"note":{"default":"","type":"string"},"occasion":{"description":"When usable: 0 always, 1 battle only, 2 menu only, 3 never","maximum":3,"minimum":0,"type":"integer"},"scope":{"default":1,"description":"Target scope: 1 one enemy, 2 all enemies, 3-6 random enemies (1-4), 7 one ally, 8 all allies, 9 one dead ally, 10 all dead allies, 11 the user","maximum":11,"minimum":0,"type":"integer"},"stypeId":{"default":1,"description":"Skill type id (1 = Magic by default)","minimum":0,"type":"integer"},"tpCost":{"default":0,"minimum":0,"type":"integer"},"tpGain":{"default":0,"description":"TP the user gains on use","minimum":0,"type":"integer"},"variance":{"default":20,"description":"Damage variance %","maximum":100,"minimum":0,"type":"integer"}},"required":["name","formula"],"type":"object"},"name":"create_damage_skill","title":"Create damage skill"},{"description":"Create a complete healing skill in one call. The formula uses MV damage syntax (`a` = user), e.g. 'a.mat * 2 + 200'. Heals HP or MP; optionally also removes states (e.g. a cure spell).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"animationId":{"default":0,"description":"Animation id from the Animations database (0 = none, -1 = normal attack)","minimum":-1,"type":"integer"},"description":{"default":"","description":"Two-line description shown in menus","type":"string"},"formula":{"description":"Recovery formula, e.g. 'a.mat * 2 + 200'","type":"string"},"iconIndex":{"default":0,"description":"Icon sheet index","minimum":0,"type":"integer"},"mpCost":{"default":0,"minimum":0,"type":"integer"},"name":{"type":"string"},"note":{"default":"","type":"string"},"occasion":{"description":"When usable: 0 always, 1 battle only, 2 menu only, 3 never","maximum":3,"minimum":0,"type":"integer"},"recoverType":{"default":"hp","enum":["hp","mp"],"type":"string"},"removeStates":{"default":[],"description":"State ids to remove from the target (100% chance), e.g. poison","items":{"minimum":1,"type":"integer"},"type":"array"},"scope":{"default":7,"description":"Target scope: 1 one enemy, 2 all enemies, 3-6 random enemies (1-4), 7 one ally, 8 all allies, 9 one dead ally, 10 all dead allies, 11 the user (default: one ally)","maximum":11,"minimum":0,"type":"integer"},"stypeId":{"default":1,"description":"Skill type id (1 = Magic by default)","minimum":0,"type":"integer"},"tpCost":{"default":0,"minimum":0,"type":"integer"},"variance":{"default":20,"maximum":100,"minimum":0,"type":"integer"}},"required":["name","formula"],"type":"object"},"name":"create_healing_skill","title":"Create healing skill"},{"description":"Create a skill that applies parameter buffs and/or debuffs. Parameter ids: 0 Max HP, 1 Max MP, 2 Attack, 3 Defense, 4 M.Attack, 5 M.Defense, 6 Agility, 7 Luck. If only debuffs are given the scope defaults to one enemy, otherwise one ally.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"animationId":{"default":0,"description":"Animation id from the Animations database (0 = none, -1 = normal attack)","minimum":-1,"type":"integer"},"buffs":{"default":[],"description":"Buffs to add to the target","items":{"additionalProperties":false,"properties":{"param":{"description":"Parameter id (0-7)","maximum":7,"minimum":0,"type":"integer"},"turns":{"default":5,"minimum":1,"type":"integer"}},"required":["param"],"type":"object"},"type":"array"},"debuffs":{"default":[],"description":"Debuffs to add to the target","items":{"additionalProperties":false,"properties":{"param":{"description":"Parameter id (0-7)","maximum":7,"minimum":0,"type":"integer"},"turns":{"default":5,"minimum":1,"type":"integer"}},"required":["param"],"type":"object"},"type":"array"},"description":{"default":"","description":"Two-line description shown in menus","type":"string"},"iconIndex":{"default":0,"description":"Icon sheet index","minimum":0,"type":"integer"},"mpCost":{"default":0,"minimum":0,"type":"integer"},"name":{"type":"string"},"note":{"default":"","type":"string"},"occasion":{"description":"When usable: 0 always, 1 battle only, 2 menu only, 3 never","maximum":3,"minimum":0,"type":"integer"},"scope":{"description":"Target scope: 1 one enemy, 2 all enemies, 3-6 random enemies (1-4), 7 one ally, 8 all allies, 9 one dead ally, 10 all dead allies, 11 the user","maximum":11,"minimum":0,"type":"integer"},"stypeId":{"default":1,"description":"Skill type id (1 = Magic by default)","minimum":0,"type":"integer"},"tpCost":{"default":0,"minimum":0,"type":"integer"}},"required":["name"],"type":"object"},"name":"create_buff_skill","title":"Create buff/debuff skill"},{"description":"Create a skill that adds or removes states (poison, sleep, etc.) on the target, each with its own success chance. State ids come from the States database (list_records type=states).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"action":{"default":"add","enum":["add","remove"],"type":"string"},"animationId":{"default":0,"description":"Animation id from the Animations database (0 = none, -1 = normal attack)","minimum":-1,"type":"integer"},"description":{"default":"","description":"Two-line description shown in menus","type":"string"},"iconIndex":{"default":0,"description":"Icon sheet index","minimum":0,"type":"integer"},"mpCost":{"default":0,"minimum":0,"type":"integer"},"name":{"type":"string"},"note":{"default":"","type":"string"},"occasion":{"description":"When usable: 0 always, 1 battle only, 2 menu only, 3 never","maximum":3,"minimum":0,"type":"integer"},"scope":{"description":"Target scope: 1 one enemy, 2 all enemies, 3-6 random enemies (1-4), 7 one ally, 8 all allies, 9 one dead ally, 10 all dead allies, 11 the user (default: one enemy for add, one ally for remove)","maximum":11,"minimum":0,"type":"integer"},"states":{"description":"States to add/remove","items":{"additionalProperties":false,"properties":{"chance":{"default":100,"description":"Success chance in %","maximum":100,"minimum":0,"type":"number"},"stateId":{"minimum":1,"type":"integer"}},"required":["stateId"],"type":"object"},"minItems":1,"type":"array"},"stypeId":{"default":1,"description":"Skill type id (1 = Magic by default)","minimum":0,"type":"integer"},"tpCost":{"default":0,"minimum":0,"type":"integer"}},"required":["name","states"],"type":"object"},"name":"create_state_skill","title":"Create state skill"},{"description":"Case-insensitive substring search across database records (name, nickname, description, note, profile, messages). Searches one type, or all types when type is omitted. Returns {type, id, name, matchedIn} summaries.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"limit":{"default":50,"maximum":200,"minimum":1,"type":"integer"},"query":{"minLength":1,"type":"string"},"type":{"description":"Database to search; omit to search all databases","enum":["actors","classes","skills","items","weapons","armors","enemies","troops","states","animations","tilesets","commonEvents"],"type":"string"}},"required":["query"],"type":"object"},"name":"search_records","title":"Search database records"},{"description":"Case-insensitive substring search across events on one map or every map. Matches event names and notes; with searchCommands=true it also searches inside event command parameters (message text, script lines, plugin commands). Returns {mapId, mapName, eventId, name, x, y, matchedIn}.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"limit":{"default":50,"maximum":200,"minimum":1,"type":"integer"},"mapId":{"description":"Search only this map; omit for all maps","minimum":1,"type":"integer"},"query":{"minLength":1,"type":"string"},"searchCommands":{"default":false,"description":"Also search inside event command lists (slower, finds text/script content)","type":"boolean"}},"required":["query"],"type":"object"},"name":"search_map_events","title":"Search map events"},{"description":"List automatic backup sessions in <project>/.mcp-backups. A file is snapshotted there the first time each server session modifies it, so every session can be rolled back with restore_backup.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"list_backups","title":"List backups"},{"description":"Restore project files from a backup session (see list_backups). Restores one file (project-relative path like 'data/Actors.json') or, with no file given, every file in the session. The current state is itself backed up first, so a restore can be undone. Refused while a changeset is open (commit or discard it first). The RPG Maker editor must stay closed while files are restored.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"file":{"description":"Project-relative file to restore; omit to restore all files in the session","type":"string"},"session":{"description":"Backup session name from list_backups; defaults to the most recent","type":"string"}},"type":"object"},"name":"restore_backup","title":"Restore backup"},{"description":"Check whether the RPG Maker MV editor appears to be running and which files this server wrote have since been changed by something else (usually the editor saving over them). Report only: it never blocks or undoes any edit.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"editor_status","title":"Editor status"},{"description":"Integrity check of the whole project: parses every database file, verifies MapInfos entries have map files (and finds orphaned map files), checks registered plugins have source files, and scans event commands for references to missing common events or transfer destinations. Returns errors (broken) and warnings (suspicious).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"validate_project","title":"Validate project"},{"description":"Start a transactional batch of edits. While a changeset is open, every edit tool stages its result in memory: nothing is written to disk until commit_changeset, and all reads (get_map, get_record, list_plugins, ...) reflect the staged edits. Commit writes every staged file in one step (all or nothing) and can be rolled back later with undo_changeset; discard_changeset drops the staged edits. Only one changeset can be open at a time; restore_backup is refused while one is open and set_project discards it. Playtests read from disk, so they only see committed edits. The RPG Maker editor must stay closed while the server edits the project.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"label":{"description":"Short description of the batch, e.g. 'Add the blacksmith to Town'","minLength":1,"type":"string"}},"required":["label"],"type":"object"},"name":"begin_changeset","title":"Begin changeset"},{"description":"Write every file staged by the open changeset to disk as one unit and return a per-file summary (created/modified, event/tile/record counts). Staged .json files are validated first: if any is invalid, nothing is written and the changeset stays open. Pre-images are journaled under .mcp-backups/changesets/<id>/ so undo_changeset can roll the commit back; a commit interrupted by a crash is rolled back automatically the next time the project is opened (the files found on disk are backed up first). Other edits are refused while the commit runs. If a commit fails and its files cannot all be restored, the changeset is closed and every edit is refused until undo_changeset has restored them. Until this is called, nothing of the changeset is on disk and reads reflect the staged edits. The RPG Maker editor must stay closed while the server edits the project.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"commit_changeset","title":"Commit changeset"},{"description":"Drop every edit staged by the open changeset. Nothing on disk changes (nothing of the changeset was on disk yet), and reads go back to the files on disk. The RPG Maker editor must stay closed while the server edits the project.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"discard_changeset","title":"Discard changeset"},{"description":"Roll back the most recently committed changeset from its journal: modified files are restored byte-for-byte, files it created are deleted. Call repeatedly to step back through earlier commits. Edits made to those files after the commit are overwritten too. Refused while a changeset is open (while one is open, reads reflect its staged edits and nothing is on disk until commit). The RPG Maker editor must stay closed while the server edits the project.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"undo_changeset","title":"Undo last changeset"},{"description":"Link two maps with Transfer Player events in both directions in one call. A door event is placed on each map; stepping on (or pressing OK at) the door on map A moves the player to map B's spawn tile and vice versa. Give each side its `door` tile; add `spawn` when the player should appear next to the door instead of on it (always do this for doors drawn into walls). Both maps are validated before anything is written, and a door is refused if another event already stands on that tile (allowOverlap overrides). Use twoWay=false for a one-way link (map A's door only). Check the result with render_map_image (doors show as blue markers) and list_map_connections.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"a":{"additionalProperties":false,"properties":{"door":{"additionalProperties":false,"description":"Tile where this map's exit event is placed","properties":{"x":{"minimum":0,"type":"integer"},"y":{"minimum":0,"type":"integer"}},"required":["x","y"],"type":"object"},"mapId":{"minimum":1,"type":"integer"},"spawn":{"additionalProperties":false,"description":"Where the player appears when they ARRIVE on this map through the connection. Defaults to the door tile - give a spawn tile in front of the door when the door is in a wall.","properties":{"direction":{"default":0,"description":"Facing on arrival: 0 keep, 2 down, 4 left, 6 right, 8 up","type":"integer"},"x":{"$ref":"#/properties/a/properties/door/properties/x"},"y":{"$ref":"#/properties/a/properties/door/properties/y"}},"required":["x","y"],"type":"object"}},"required":["mapId","door"],"type":"object"},"allowOverlap":{"default":false,"type":"boolean"},"b":{"$ref":"#/properties/a"},"doorName":{"description":"Event name prefix; default 'To <destination map name>'","type":"string"},"fade":{"default":"black","enum":["black","white","none"],"type":"string"},"sound":{"additionalProperties":false,"description":"Sound effect to play before leaving, e.g. {name: 'Open1'}","properties":{"name":{"type":"string"},"volume":{"default":90,"maximum":100,"minimum":0,"type":"integer"}},"required":["name"],"type":"object"},"trigger":{"default":"touch","description":"touch = player walks onto the door tile, action = player presses OK facing it","enum":["touch","action"],"type":"string"},"twoWay":{"default":true,"description":"Create the return door on map B as well","type":"boolean"}},"required":["a","b"],"type":"object"},"name":"connect_maps","title":"Connect two maps"},{"description":"Scan every map's events for Transfer Player commands and show how the maps are linked: each door with its destination, one-way links without a way back, transfers to maps that do not exist, and maps that cannot be reached from the game's start map. Transfers whose target is chosen by variables are listed as dynamic and cannot be followed, so 'unreachable' is a hint, not proof.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"mapId":{"description":"Only list doors on this map (the reachability analysis still uses all maps)","minimum":1,"type":"integer"}},"type":"object"},"name":"list_map_connections","title":"List map connections"},{"description":"Change one or more fields on many database records at once, with a diff. Example - all weapons +10% attack: {type: 'weapons', changes: [{field: 'params.atk', op: 'percent', value: 10}]}. Select records with `ids` and/or `where` conditions (all must match); with neither, every record is selected. Fields are paths such as 'price', 'params.atk' (mhp/mmp/atk/def/mat/mdf/agi/luk), 'params[2]', 'damage.formula', 'traits[0].value'. Ops: set (any value), add, multiply, percent (+value%) - numeric ops round to whole numbers for integer fields (round: auto), with optional min/max clamps. DRY RUN BY DEFAULT: nothing is written until you pass dryRun=false, so show the diff to the user first. If any record fails, nothing is written.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"changes":{"items":{"additionalProperties":false,"properties":{"field":{"type":"string"},"max":{"type":"number"},"min":{"type":"number"},"op":{"enum":["set","add","multiply","percent"],"type":"string"},"round":{"enum":["auto","none","round","floor","ceil"],"type":"string"},"value":{}},"required":["field","op"],"type":"object"},"minItems":1,"type":"array"},"dryRun":{"default":true,"description":"true = only preview the diff (default), false = write the changes","type":"boolean"},"ids":{"description":"Only these record ids","items":{"minimum":1,"type":"integer"},"type":"array"},"maxPreview":{"default":50,"description":"Maximum records shown in the diff","maximum":500,"minimum":1,"type":"integer"},"type":{"enum":["actors","classes","skills","items","weapons","armors","enemies","troops","states","animations","tilesets","commonEvents"],"type":"string"},"where":{"description":"Conditions, e.g. [{field: 'wtypeId', op: 'eq', value: 1}, {field: 'name', op: 'contains', value: 'sword'}]","items":{"additionalProperties":false,"properties":{"field":{"type":"string"},"op":{"enum":["eq","ne","gt","gte","lt","lte","contains","matches","exists"],"type":"string"},"value":{}},"required":["field","op"],"type":"object"},"type":"array"}},"required":["type","changes"],"type":"object"},"name":"bulk_update_records","title":"Bulk update records"},{"description":"Generate stat curves over levels and (optionally) write them into a class. Each curve goes from `start` at minLevel to `end` at maxLevel with a shape: linear, ease-in (slow start), ease-out (fast start), ease-in-out, exponential (constant growth factor) or logistic (S-curve). Without classId this is a pure preview of the numbers. With classId the class's params table is rewritten for minLevel..maxLevel (other levels are untouched) - dry run by default, pass dryRun=false to apply. Follow up with balance_report to see how the new curve plays against enemies.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"classId":{"description":"Write the curves into this class","minimum":1,"type":"integer"},"curves":{"items":{"additionalProperties":false,"properties":{"end":{"description":"Value at the last point","type":"number"},"exponent":{"description":"Power for ease shapes (default 2), steepness for logistic (default 8)","exclusiveMinimum":0,"type":"number"},"param":{"anyOf":[{"enum":["mhp","mmp","atk","def","mat","mdf","agi","luk"],"type":"string"},{"maximum":7,"minimum":0,"type":"integer"}],"description":"mhp, mmp, atk, def, mat, mdf, agi, luk (or 0-7)"},"shape":{"default":"linear","enum":["linear","ease-in","ease-out","ease-in-out","exponential","logistic"],"type":"string"},"start":{"description":"Value at the first point of the curve","type":"number"}},"required":["start","end","param"],"type":"object"},"maxItems":8,"minItems":1,"type":"array"},"dryRun":{"default":true,"type":"boolean"},"maxLevel":{"default":99,"maximum":99,"minimum":1,"type":"integer"},"minLevel":{"default":1,"maximum":99,"minimum":1,"type":"integer"}},"required":["curves"],"type":"object"},"name":"generate_param_curve","title":"Generate class parameter curve"},{"description":"Spread enemy stats along a curve for smooth difficulty progression. Give the enemies ordered from weakest to strongest; the first gets each curve's `start`, the last its `end`, the rest are interpolated with the chosen shape. Curves can target any parameter (mhp, mmp, atk, def, mat, mdf, agi, luk) plus `exp` and `gold`. Dry run by default - shows before and after per enemy; pass dryRun=false to write.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"curves":{"items":{"additionalProperties":false,"properties":{"end":{"description":"Value at the last point","type":"number"},"exponent":{"description":"Power for ease shapes (default 2), steepness for logistic (default 8)","exclusiveMinimum":0,"type":"number"},"param":{"anyOf":[{"anyOf":[{"enum":["mhp","mmp","atk","def","mat","mdf","agi","luk"],"type":"string"},{"maximum":7,"minimum":0,"type":"integer"}]},{"enum":["exp","gold"],"type":"string"}]},"shape":{"default":"linear","enum":["linear","ease-in","ease-out","ease-in-out","exponential","logistic"],"type":"string"},"start":{"description":"Value at the first point of the curve","type":"number"}},"required":["start","end","param"],"type":"object"},"maxItems":10,"minItems":1,"type":"array"},"dryRun":{"default":true,"type":"boolean"},"enemyIds":{"description":"Enemy ids from weakest to strongest","items":{"minimum":1,"type":"integer"},"maxItems":200,"minItems":1,"type":"array"}},"required":["enemyIds","curves"],"type":"object"},"name":"generate_enemy_scaling","title":"Generate enemy scaling"},{"description":"Measure the game's balance from its data: (1) class stat curves at chosen levels, (2) the attack skill's damage by level against a reference enemy, (3) a matrix of attackers vs enemies (average damage and hits to kill) and (4) enemy threat vs the same characters (damage of the enemy's best attack and hits to kill them). Ends with warnings: unevaluable damage formulas, curves that go down, enemies killed in one hit or immune, enemies that one-shot a character. Attackers default to the starting party. Numbers are averages with no variance, crits or misses and ignore states, items and elements beyond what the skill/traits specify - use simulate_battle for a full fight.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"attackers":{"description":"Characters for the matrices; default: the starting party at their initial level","items":{"additionalProperties":false,"properties":{"actorId":{"minimum":1,"type":"integer"},"classId":{"minimum":1,"type":"integer"},"level":{"maximum":99,"minimum":1,"type":"integer"},"skillId":{"default":1,"description":"Skill the attacker uses (default 1 = Attack)","minimum":1,"type":"integer"}},"type":"object"},"maxItems":6,"type":"array"},"classIds":{"description":"Classes for the curve tables (default: the first 6)","items":{"minimum":1,"type":"integer"},"maxItems":10,"type":"array"},"enemyIds":{"description":"Enemies to list (default: the first 40)","items":{"minimum":1,"type":"integer"},"maxItems":60,"type":"array"},"levels":{"default":[1,10,25,50,99],"description":"Levels for the curve tables","items":{"maximum":99,"minimum":1,"type":"integer"},"maxItems":8,"minItems":1,"type":"array"},"referenceEnemyId":{"description":"Enemy for the damage-by-level table (default: the one with median HP)","minimum":1,"type":"integer"}},"type":"object"},"name":"balance_report","title":"Balance report"},{"description":"Run many simulated battles of a troop against a party and report win rate, turns, how much HP the party keeps and who does the damage or dies. Uses the project's real stats (class curves, equipment, traits), damage formulas, variance, critical hits, hit/evasion rates, agility turn order, target weighting (TGR) and enemy action ratings. Party members use `skillIds` in order (first affordable one, healing only when an ally is below 60% HP), falling back to the Attack skill. Not modelled: states, buffs, items, guarding, TP, enemy conditions on states/switches (treated as false). Seeded, so results are reproducible. Default party: the starting party at their initial level.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"level":{"description":"Set every party member to this level","maximum":99,"minimum":1,"type":"integer"},"maxTurns":{"default":40,"maximum":200,"minimum":1,"type":"integer"},"party":{"items":{"additionalProperties":false,"properties":{"actorId":{"minimum":1,"type":"integer"},"level":{"description":"Default: the actor's initial level","maximum":99,"minimum":1,"type":"integer"},"skillIds":{"description":"Skills in order of preference (default [1])","items":{"minimum":1,"type":"integer"},"type":"array"}},"required":["actorId"],"type":"object"},"maxItems":8,"minItems":1,"type":"array"},"runs":{"default":300,"maximum":5000,"minimum":1,"type":"integer"},"seed":{"default":1,"type":"integer"},"troopId":{"minimum":1,"type":"integer"}},"required":["troopId"],"type":"object"},"name":"simulate_battle","title":"Simulate a battle"},{"description":"Export every translatable text of the project to a CSV or JSON file inside the project (default localization/texts.csv) with columns key, context, original, translation. Covers database names/descriptions/messages, System terms and type names, the game title, map display names, and event text (dialogue boxes as one row each with lines joined by newlines, choices, scrolling text, actor name/nickname/profile commands) in maps, common events and troop battle events. If the file already exists its translations are carried over by key, so re-exporting after changes never loses work. Fill in the translation column (leave empty to keep the original), then use import_texts. See the rpgmaker-localization skill for rules about control codes and message length.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"file":{"description":"Output path relative to the project folder (default localization/texts.<format>)","type":"string"},"format":{"default":"csv","enum":["csv","json"],"type":"string"},"scope":{"description":"Limit to some categories (default: all)","items":{"enum":["database","system","maps","commonEvents","troops"],"type":"string"},"type":"array"}},"type":"object"},"name":"export_texts","title":"Export all game texts"},{"description":"Apply the translation column of a file written by export_texts back into the project's data. DRY RUN BY DEFAULT: reports what would change and nothing is written until dryRun=false. Rows with an empty translation are skipped. A row whose `original` no longer matches the project text (the text changed after export) is skipped unless force=true. Dialogue translations longer than 4 lines are split into several message boxes automatically; choices are kept in sync. Control codes (\\C[n], \\V[n], \\N[n] ...) are compared with the original and mismatches are reported as warnings.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"dryRun":{"default":true,"type":"boolean"},"file":{"description":"Path relative to the project folder, e.g. localization/texts.csv","type":"string"},"force":{"default":false,"description":"Apply rows even if their original text no longer matches","type":"boolean"}},"required":["file"],"type":"object"},"name":"import_texts","title":"Import translated texts"},{"description":"Checks that every image and audio file the project references exists on disk, and optionally lists files nothing references. Scanned references: Actors (characterName, faceName, battlerName); Enemies battlerName (img/enemies, or img/sv_enemies when System optSideView is on); Tilesets tilesetNames; Maps (parallaxName, bgm, bgs, battleback1Name, battleback2Name, event page images); event commands 101 (face), 132/133/139/140 (battle BGM, victory ME, defeat ME, vehicle BGM), 231 (picture), 241/245/249/250 (BGM/BGS/ME/SE), 283 (battle back), 284 (parallax), 322 (actor graphics) and 323 (vehicle image) in map events, common events and troops; System (title1Name, title2Name, battleback1Name, battleback2Name, titleBgm, battleBgm, victoryMe, defeatMe, gameoverMe, boat/ship/airship bgm, sounds). Anything else is listed under notScanned, so 'unused' can include files used only by plugins or scripts. Audio is satisfied by either an .ogg or an .m4a file. caseMismatch means the file exists only with different letter case: it works on Windows but breaks on Linux, macOS and web deployments. Each list is capped at 200 entries; truncated gives the omitted counts.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"includeUnused":{"default":true,"description":"Also list asset files that no scanned reference uses.","type":"boolean"}},"type":"object"},"name":"audit_assets","title":"Audit project assets"},{"description":"Statically checks event command lists in map events, common events and troop pages. Rules: unterminated-list and block-structure (missing code 0 terminator, unclosed or mismatched choices/branches/loops, indent jumps; error), unreachable-command (a command right after Exit Event Processing at the same indent; warning), long-message-line (a Show Text line too long for the window; warning), transfer-missing-map and transfer-out-of-bounds (direct Transfer Player to a map not in MapInfos or outside its size; error), missing-common-event (Common Event call to an id that does not exist; error), unnamed-switch and unnamed-variable (Control Switches/Variables on ids with no name in System.json; info). Variable-designated transfers are not checked. long-message-line removes message control codes (\\C[n], \\V[n], \\N[n], \\P[n], \\I[n], \\{ \\} \\. \\| \\! \\> \\< \\^) and compares the remaining character count with maxLineChars; the default of 50 is only an approximation, since real fit depends on the font, face graphic and window width. Findings carry location {kind, mapId, eventId, page, index}; page and index are 0-based positions in the event's pages and command list (common events use page 0, troops use the troop id as eventId). minSeverity defaults to warning, so info findings appear only when requested. scope defaults to all; mapId limits the map part to one map. Maps whose file cannot be read are listed in skippedMaps. Results are sorted by severity then location and capped at 300 findings; counts cover all findings and truncated is the number cut.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"mapId":{"description":"Lint only this map (affects the maps part of the scope).","exclusiveMinimum":0,"type":"integer"},"maxLineChars":{"default":50,"description":"Longest allowed Show Text line after control codes are removed (approximate).","exclusiveMinimum":0,"type":"integer"},"minSeverity":{"default":"warning","description":"Lowest severity to report.","enum":["error","warning","info"],"type":"string"},"scope":{"default":"all","description":"Which event lists to lint.","enum":["maps","commonEvents","troops","all"],"type":"string"}},"type":"object"},"name":"lint_events","title":"Lint event command lists"},{"description":"Dry-runs one map event page against a hypothetical game state and returns what it would do, without touching the project or running the game. Supported commands: Show Text (101/401), Show Choices (102/402/403/404), Conditional Branch (111/411/412: switch, variable, self switch, gold, item), Loop/Break (112/113/413), Exit Event Processing (115), Common Event (117, nested up to 8 deep), comments, Control Switches (121), Control Variables (122: constant, variable and random operands), Control Self Switch (123), Change Gold (125), Change Items (126), Transfer Player (201, ends the run) and Plugin Command (356, listed in changes as 'plugin: ...'). Battle Processing (301) is not fought: the branch picked by battleResult runs (win, escape or lose; default win) and the others are skipped; a missing branch adds 'battle: no <result> branch' to changes. A Battle Processing without branches (what the editor writes when neither Can Escape nor Continue when Loss is on) is a single command: nothing is skipped and the next command runs. Label (118) and Jump to Label (119) work: a jump goes to the first label of that name in the current command list and counts as a step, so a label loop ends 'stepLimit'; a missing label is listed in unsupported and the run continues. Presentation commands (Set Movement Route 205, animation and balloon 212/213, screen fades, tint, flash and shake 221-225, wait 230, show/move/erase picture 231/232/235, weather 236, play/fade audio 241/242/245/246/249/250/251, 505 route rows) are ignored and only counted in cosmetic, not listed in unsupported; the one exception is the switch ON/OFF steps of a Set Movement Route, which do change the simulated switches (changes: 'switch N → ON (move route)'; only the first 1000 route entries are scanned, each costing one step, and a longer route adds an unsupported note). A battleResult of escape or lose on a battle that cannot be escaped or lost still runs the branch but adds a note to changes. Everything else (script 355, other condition types, game-data operands, party and scene commands, ...) is listed in unsupported with its index and skipped; an unsupported condition follows unknownCondition: stop (default) ends the run with ended 'unsupported', then/else takes that branch. Message text is returned verbatim, control codes unexpanded. Limits: 10000 steps (ended 'stepLimit'), integer variable math (results are floored like the engine, so -7 / 2 gives -4; division or modulo by zero leaves the variable unchanged; a random or variable operand is evaluated once per command). A command that changes several switches or variables adds one changes entry for the whole range. messages, changes and unsupported are each capped at 2000 entries; omitted counts what was dropped (present only then) and finalState stays exact. State inputs default to everything OFF/0/empty: switches and variables are keyed by id, selfSwitches by letter A to D, items by item id. choices lists the answers to Show Choices in the order they are asked (0-based; a missing answer is 0, an out-of-range one takes the cancel branch). page is a 0-based page index; when omitted the highest page whose conditions hold under the supplied state is used (the actor condition counts as met). The random operand is seeded (default seed 0), so runs repeat exactly. Returns {messages, changes, transfers, unsupported, cosmetic, ended, finalState, pageUsed}.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"battleResult":{"description":"How every Battle Processing command ends, which decides the branch that runs (default win).","enum":["win","escape","lose"],"type":"string"},"choices":{"description":"Answers to Show Choices, in the order they are asked.","items":{"minimum":0,"type":"integer"},"maxItems":50,"type":"array"},"eventId":{"description":"Event id on that map.","exclusiveMinimum":0,"type":"integer"},"gold":{"description":"Party gold (default 0).","minimum":0,"type":"integer"},"items":{"additionalProperties":{"minimum":0,"type":"integer"},"description":"Items held by id, e.g. {\"4\": 1}.","propertyNames":{"pattern":"^[1-9]\\d*$"},"type":"object"},"mapId":{"description":"Map id.","exclusiveMinimum":0,"type":"integer"},"page":{"description":"0-based page index; omit to pick the page that would be active under the supplied state.","minimum":0,"type":"integer"},"seed":{"description":"Seed for the random operand (default 0).","type":"integer"},"selfSwitches":{"additionalProperties":{"type":"boolean"},"description":"Self switches of this event, e.g. {\"A\": true}.","propertyNames":{"pattern":"^[ABCD]$"},"type":"object"},"switches":{"additionalProperties":{"type":"boolean"},"description":"Switch states by id, e.g. {\"12\": true}.","propertyNames":{"pattern":"^[1-9]\\d*$"},"type":"object"},"unknownCondition":{"default":"stop","description":"What to do at a condition that cannot be simulated.","enum":["then","else","stop"],"type":"string"},"variables":{"additionalProperties":{"type":"integer"},"description":"Variable values by id, e.g. {\"3\": 10}.","propertyNames":{"pattern":"^[1-9]\\d*$"},"type":"object"}},"required":["mapId","eventId"],"type":"object"},"name":"simulate_event","title":"Simulate an event"},{"description":"Lists everywhere one switch, variable, item, weapon, armor, skill, state, actor, class, enemy, troop, common event or map is read, written or used, and warns about dead ends. Use it before renaming, deleting or reusing an id. reads: page conditions, Conditional Branch (111), variable operands and \\V[n] text escapes; writes: Control Switches/Variables (121/122), Change Items/Weapons/Armors (126-128), Change Party Member (129), Change State/Skill (313/318), set-switch route steps; uses: Transfer Player (201), Common Event (117), Battle Processing (301), shops (302/605), actor commands, enemy drops and actions, class learnings, actor equipment, troop members, item/skill effects, map encounter lists, System startMapId and partyMembers. It reads staged changeset data. Each location is a string: 'Map003 event 5 page 1 command index 12', 'CommonEvent 4 command index 7', 'Troop 2 page 1 command index 3', 'Enemies #4 dropItems', 'System startMapId', 'Map003 encounterList'. Map ids, event ids, common event ids and troop ids are the real ids and pages are 1-based like the editor shows them, but 'command index N' is the 0-based position in the command list (the index lint_events reports). A location without a command index is a page condition. counts are the true totals; each list is cut at limit entries and truncated gives the omitted counts. warnings cover: a switch or variable that is read but never set, or set but never read; a common event never called (autorun and parallel common events are exempt); a map nothing transfers to; and an id with no name or record (unknown id, not an error). Script commands (355), plugin commands (356), variable-designated transfers and battles, notetags and plugin parameters are not understood, so every 'never ...' warning carries a note when the project has script or plugin commands (or truncated range commands) that could act on the id. Only the 121/122 ids up to 1000 per command are indexed.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"id":{"description":"Id of the switch, variable, database record, common event or map.","maximum":2147483647,"minimum":1,"type":"integer"},"kind":{"description":"What to look up.","enum":["switch","variable","item","weapon","armor","skill","state","actor","class","enemy","troop","commonEvent","map"],"type":"string"},"limit":{"default":100,"description":"Most locations listed per role (reads, writes, uses).","maximum":500,"minimum":1,"type":"integer"}},"required":["kind","id"],"type":"object"},"name":"find_usages","title":"Find usages"},{"description":"Finds references that point at records which do not exist: a Battle Processing (301) on a missing troop, a shop item (302/605), Change Items/Weapons/Armors (126-128), Learn/Forget Skill (318), Change State (313), Change Party Member (129) and the other actor commands, Common Event calls (117), Transfer Player (201) or Set Vehicle Location (202) to a missing map, page conditions on a missing item or actor, enemy drops and actions, class learnings, actor class and equipment, troop members, item and skill effects, map encounter lists and System startMapId and partyMembers. It uses the same index as find_usages, so it checks exactly the references find_usages lists (staged changeset data included). A record exists when its database file (Items, Weapons, Armors, Skills, States, Actors, Classes, Enemies, Troops, CommonEvents) holds a non-null row whose id field is that id (not its array position, as in find_usages), or MapInfos.json lists the map. Id 0 means 'none' (an empty equipment slot, no drop) and is never reported. Switches and variables are not checked (plain numbers; lint_events reports unnamed ones). Run it before a release and after deleting or renaming records, and use find_usages on one reported id to see every place. Returns {summary, missing: [{kind, id, count, locations, severity: 'error'}], truncated, counts: {distinctMissing, references}, notes}. missing is grouped by kind and id, ordered by kind (item, weapon, armor, skill, state, actor, class, enemy, troop, commonEvent, map) then id; count is the number of references and locations lists at most 3 of them (same format as find_usages). missing is cut at limit groups and truncated is the number cut. A database file that is missing or unreadable is named in notes and its references are NOT reported as missing. notes also state what is not checked: references made by script commands, plugin commands, notetags, plugin parameters, damage formulas, trait codes and variable-designated transfers and battles (with how many such commands the project has), and maps that could not be read.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"limit":{"default":100,"description":"Most missing records (kind + id groups) returned.","maximum":1000,"minimum":1,"type":"integer"}},"type":"object"},"name":"check_references","title":"Check references"},{"description":"Answers 'can the player get from the start map to X, and what can never happen?' for the whole project, without running the game.\nModel (an over-approximation): starting at System startMapId, a page may run whenever its page conditions could hold, and when it runs ALL of its commands take effect. Switches only ever turn ON, items are never lost, and conditions inside event commands (branches, choices) are ignored. So 'unreachable' (maps, pages, goals) is a proof under the model, while 'reachable' only means 'not ruled out'.\nIt cannot see script commands (355), plugin commands (356), variable-designated transfers or battles, enabled plugins (parameters, notetags) or anything else a plugin does. Each of those, an unreadable map or an unreadable js/plugins.js lowers uncertainty.confidence to 'low'; only trust 'unreachable' and 'dead' results when confidence is 'high'.\nReturns reachableMaps, unreachableMaps, deadEndMaps (no exit), deadPages (pages that can never run, with the first unmet condition), switches/variables read-but-never-set and set-but-never-read, edges (direct transfers), notes, a plain-language summary and names (map id to name).\ngoal (exactly one of switch, mapId or event) adds a verdict with up to 10 blockedBy reasons. includeGraph adds a Mermaid flowchart of the map transfers. Lists are cut at limit (the summary counts stay exact); truncated is also set when an analysis cap was hit (see notes). Staged changeset data is analysed.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"goal":{"additionalProperties":false,"description":"What to check, exactly one key: { switch: n }, { mapId: n } or { event: { mapId, eventId } }.","properties":{"event":{"additionalProperties":false,"description":"Can any page of this map event ever run?","properties":{"eventId":{"maximum":2147483647,"minimum":1,"type":"integer"},"mapId":{"maximum":2147483647,"minimum":1,"type":"integer"}},"required":["mapId","eventId"],"type":"object"},"mapId":{"description":"Can the player ever get to this map?","maximum":2147483647,"minimum":1,"type":"integer"},"switch":{"description":"Can this switch ever be ON?","maximum":2147483647,"minimum":1,"type":"integer"}},"type":"object"},"includeGraph":{"default":false,"description":"Also return a Mermaid flowchart of the direct map transfers.","type":"boolean"},"limit":{"default":200,"description":"Most entries per list in the report.","maximum":500,"minimum":1,"type":"integer"}},"type":"object"},"name":"analyze_progression","title":"Analyze progression"},{"description":"Compiles a nested tree of nodes into correctly indented event commands and optionally inserts it into an event page, so you never hand-write indents, block terminators or move-route rows. Covers dialogue, branching, switches and variables, cutscenes (screen effects, audio, pictures, animations, move routes) and game flow (battles, shops, items, gold, party, scenes, labels). With mapId + eventId the commands are inserted at indent 0 before the page's end (or at `index`), like add_event_command; without them, or with dryRun, nothing is written and the compiled commands are returned in `preview`. `tree` is an array of nodes; every node is an object with one main key, and unknown keys are rejected. choices, if and battle bodies nest at most 8 levels deep (each body counts as a level). A node that is invalid anywhere in the tree fails the whole call and nothing is written. Node vocabulary, in three groups. (1) MESSAGES AND FLOW: {say: string | string[], face?: {name, index}, background?: 0|1|2, position?: 0|1|2} (4 lines per message box; \"\\n\" splits lines; control codes like \\C[2] are kept as written); {choices: [{label, then?: Node[]}] (1-6), cancel?: \"disallow\" (default) | \"branch\" | choiceIndex}; {if: Condition, then?: Node[], else?: Node[]} with Condition = {switch, is?} | {variable, op: \"eq\"|\"ne\"|\"gt\"|\"gte\"|\"lt\"|\"lte\", value} | {selfSwitch: \"A\"..\"D\", is?} | {gold} (party has at least) | {item} (party has item); {setSwitch: {id, value}} | {setVariable: {id, op: \"set\"|\"add\"|\"sub\", value}} | {setSelfSwitch: {ch, value}} | {transfer: {mapId, x, y, direction?: 0|2|4|6|8, fade?: 0|1|2}} | {raw: [{code, indent?, parameters?}]} (indent is relative to the node's position). Example: [{\"say\":\"Will you help?\",\"face\":{\"name\":\"Actor1\",\"index\":0}},{\"choices\":[{\"label\":\"Yes\",\"then\":[{\"setSwitch\":{\"id\":5,\"value\":true}},{\"say\":\"Thank you!\"}]},{\"label\":\"No\",\"then\":[{\"say\":\"A pity.\"}]}],\"cancel\":\"branch\"}]. (2) CUTSCENE, where target is \"player\" | \"this\" (the running event) | a positive event id: {wait: 1-6000} (frames; 60 = 1 second) | {fade: \"out\"|\"in\"} | {tint: {r, g, b: -255..255, gray: 0-255, frames?: 1-600 (60), wait?: true}} | {flash: {r, g, b: 0-255, intensity: 0-255, frames?: 1-600 (60), wait?: true}} | {shake: {power?: 1-9 (5), speed?: 1-9 (5), frames?: 1-600 (30), wait?: true}} | {weather: {type: \"none\"|\"rain\"|\"storm\"|\"snow\", power?: 1-9 (5), frames?: 1-600 (60), wait?: false}} | {playAudio: {kind: \"bgm\"|\"bgs\"|\"me\"|\"se\", name (use \"\" to stop that channel), volume?: 0-100 (90), pitch?: 50-150 (100), pan?: -100..100 (0)}} | {fadeAudio: {kind: \"bgm\"|\"bgs\", seconds: 1-60}} | {showPicture: {id: 1-100, name, origin?: \"upperLeft\"|\"center\", x, y, scaleX?: 0-2000 (100), scaleY?: 0-2000 (100), opacity?: 0-255 (255), blend?: \"normal\"|\"add\"|\"multiply\"|\"screen\"}} | {erasePicture: 1-100} | {animation: {target, animationId, wait?: true}} | {balloon: {target, balloonId: 1-10, wait?: true}} | {moveRoute: {target, steps: 1-100 steps, repeat?: false, skippable?: false, wait?: true}} (compiles to command 205 plus one 505 row per step). A route step is one of the strings down, left, right, up, turnDown, turnLeft, turnRight, turnUp, walkAnimOn, walkAnimOff, stepAnimOn, stepAnimOff, dirFixOn, dirFixOff, throughOn, throughOff, transparentOn, transparentOff, or an object {jump: {x, y}} (relative tiles, -1000..1000) | {wait: 1-999} | {switchOn: id} | {switchOff: id} | {speed: 1-6} | {frequency: 1-5}. A repeating route never finishes, so with repeat: true wait defaults to false and an explicit wait: true is rejected. Example: [{\"fade\":\"out\"},{\"playAudio\":{\"kind\":\"bgm\",\"name\":\"Theme1\"}},{\"moveRoute\":{\"target\":\"player\",\"steps\":[\"up\",\"up\",{\"wait\":10},\"turnLeft\"]}},{\"fade\":\"in\"}]. (3) GAME FLOW: {battle: {troopId, canEscape?: false, canLose?: false, onWin?: Node[], onEscape?: Node[] (needs canEscape: true), onLose?: Node[] (needs canLose: true)}} (like the editor, branches are written only when canEscape or canLose is true or onWin has nodes: then 601, plus 602 with canEscape and 603 with canLose even when empty, and the closer 604; with neither, just the battle command is written and what follows runs after the battle; a body for a branch whose box is off is rejected) | {shop: {goods: [{type: \"item\"|\"weapon\"|\"armor\", id, price?}] (1-40; omit price for the database price), purchaseOnly?: false}} | {callCommon: commonEventId} | {label: name} | {jump: label name} (jump to a label in the same list) | {exit: true} (stop this event) | {comment: string | string[]} (not shown in game) | {gold: n} (positive gives, negative takes; not 0) | {item: {kind: \"item\"|\"weapon\"|\"armor\", id, count}} (positive adds, negative removes, not 0, |count| <= 99; weapons/armors only change the inventory, not equipped gear) | {party: {actorId, action: \"add\"|\"remove\", initialize?: false}} (initialize resets the actor when added) | {learnSkill: {actorId, skillId, forget?: false}} | {recoverAll: true} (full HP/MP/states for the whole party) | {nameInput: {actorId, maxChars: 1-16}} | {plugin: \"Command arg1 arg2\"} (plugin command) | {scene: \"menu\"|\"save\"|\"gameOver\"|\"title\"}. Example: [{\"battle\":{\"troopId\":3,\"canLose\":true,\"onWin\":[{\"gold\":200},{\"item\":{\"kind\":\"item\",\"id\":1,\"count\":2}}],\"onLose\":[{\"say\":\"Defeated...\"},{\"scene\":\"gameOver\"}]}},{\"shop\":{\"goods\":[{\"type\":\"item\",\"id\":1},{\"type\":\"weapon\",\"id\":2,\"price\":300}]}}]. Returns { commands, inserted?, problems, preview? }; preview is included for dry runs and for trees of up to 40 commands.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"dryRun":{"default":false,"description":"Compile and validate only; never touches the project files","type":"boolean"},"eventId":{"description":"Event to insert into; omit (with mapId) for a dry run","minimum":1,"type":"integer"},"index":{"description":"Position in the page's command list to insert at; defaults to the end (before the terminator). Positions inside a conditional, choice or battle body (the branch markers 402, 403, 404, 411, 412, 413, 601, 602, 603, 604 count as inside), or on a continuation line of a multi-line command (text, comment, move route, script or shop lines: 401, 405, 408, 505, 605, 655), are refused","minimum":0,"type":"integer"},"mapId":{"description":"Map to insert into; omit (with eventId) for a dry run","minimum":1,"type":"integer"},"pageIndex":{"default":0,"description":"Which event page (0-based)","minimum":0,"type":"integer"},"tree":{"description":"Dialogue nodes, in order","items":{"anyOf":[{"additionalProperties":false,"properties":{"background":{"enum":[0,1,2],"type":"number"},"face":{"additionalProperties":false,"properties":{"index":{"maximum":7,"minimum":0,"type":"integer"},"name":{"type":"string"}},"required":["name","index"],"type":"object"},"position":{"enum":[0,1,2],"type":"number"},"say":{"anyOf":[{"minLength":1,"type":"string"},{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"}]}},"required":["say"],"type":"object"},{"additionalProperties":false,"properties":{"cancel":{"anyOf":[{"enum":["disallow","branch"],"type":"string"},{"maximum":5,"minimum":0,"type":"integer"}]},"choices":{"items":{"additionalProperties":false,"properties":{"label":{"minLength":1,"type":"string"},"then":{"items":{"$ref":"#/properties/tree/items"},"type":"array"}},"required":["label"],"type":"object"},"maxItems":6,"minItems":1,"type":"array"}},"required":["choices"],"type":"object"},{"additionalProperties":false,"properties":{"else":{"items":{"$ref":"#/properties/tree/items"},"type":"array"},"if":{"anyOf":[{"additionalProperties":false,"properties":{"is":{"type":"boolean"},"switch":{"minimum":1,"type":"integer"}},"required":["switch"],"type":"object"},{"additionalProperties":false,"properties":{"op":{"enum":["eq","ne","gt","gte","lt","lte"],"type":"string"},"value":{"type":"integer"},"variable":{"minimum":1,"type":"integer"}},"required":["variable","op","value"],"type":"object"},{"additionalProperties":false,"properties":{"is":{"type":"boolean"},"selfSwitch":{"enum":["A","B","C","D"],"type":"string"}},"required":["selfSwitch"],"type":"object"},{"additionalProperties":false,"properties":{"gold":{"minimum":0,"type":"integer"}},"required":["gold"],"type":"object"},{"additionalProperties":false,"properties":{"item":{"minimum":1,"type":"integer"}},"required":["item"],"type":"object"}]},"then":{"items":{"$ref":"#/properties/tree/items"},"type":"array"}},"required":["if"],"type":"object"},{"additionalProperties":false,"properties":{"setSwitch":{"additionalProperties":false,"properties":{"id":{"minimum":1,"type":"integer"},"value":{"type":"boolean"}},"required":["id","value"],"type":"object"}},"required":["setSwitch"],"type":"object"},{"additionalProperties":false,"properties":{"setVariable":{"additionalProperties":false,"properties":{"id":{"minimum":1,"type":"integer"},"op":{"enum":["set","add","sub"],"type":"string"},"value":{"type":"integer"}},"required":["id","op","value"],"type":"object"}},"required":["setVariable"],"type":"object"},{"additionalProperties":false,"properties":{"setSelfSwitch":{"additionalProperties":false,"properties":{"ch":{"$ref":"#/properties/tree/items/anyOf/2/properties/if/anyOf/2/properties/selfSwitch"},"value":{"type":"boolean"}},"required":["ch","value"],"type":"object"}},"required":["setSelfSwitch"],"type":"object"},{"additionalProperties":false,"properties":{"transfer":{"additionalProperties":false,"properties":{"direction":{"enum":[0,2,4,6,8],"type":"number"},"fade":{"enum":[0,1,2],"type":"number"},"mapId":{"minimum":1,"type":"integer"},"x":{"minimum":0,"type":"integer"},"y":{"minimum":0,"type":"integer"}},"required":["mapId","x","y"],"type":"object"}},"required":["transfer"],"type":"object"},{"additionalProperties":false,"properties":{"raw":{"items":{"additionalProperties":false,"properties":{"code":{"minimum":0,"type":"integer"},"indent":{"default":0,"minimum":0,"type":"integer"},"parameters":{"default":[],"items":{},"type":"array"}},"required":["code"],"type":"object"},"minItems":1,"type":"array"}},"required":["raw"],"type":"object"},{"additionalProperties":false,"properties":{"battle":{"additionalProperties":false,"properties":{"canEscape":{"type":"boolean"},"canLose":{"$ref":"#/properties/tree/items/anyOf/8/properties/battle/properties/canEscape"},"onEscape":{"items":{"$ref":"#/properties/tree/items"},"type":"array"},"onLose":{"items":{"$ref":"#/properties/tree/items"},"type":"array"},"onWin":{"items":{"$ref":"#/properties/tree/items"},"type":"array"},"troopId":{"minimum":1,"type":"integer"}},"required":["troopId"],"type":"object"}},"required":["battle"],"type":"object"},{"additionalProperties":false,"properties":{"wait":{"maximum":6000,"minimum":1,"type":"integer"}},"required":["wait"],"type":"object"},{"additionalProperties":false,"properties":{"fade":{"enum":["out","in"],"type":"string"}},"required":["fade"],"type":"object"},{"additionalProperties":false,"properties":{"tint":{"additionalProperties":false,"properties":{"b":{"maximum":255,"minimum":-255,"type":"integer"},"frames":{"maximum":600,"minimum":1,"type":"integer"},"g":{"maximum":255,"minimum":-255,"type":"integer"},"gray":{"maximum":255,"minimum":0,"type":"integer"},"r":{"maximum":255,"minimum":-255,"type":"integer"},"wait":{"$ref":"#/properties/tree/items/anyOf/8/properties/battle/properties/canEscape"}},"required":["r","g","b","gray"],"type":"object"}},"required":["tint"],"type":"object"},{"additionalProperties":false,"properties":{"flash":{"additionalProperties":false,"properties":{"b":{"maximum":255,"minimum":0,"type":"integer"},"frames":{"$ref":"#/properties/tree/items/anyOf/11/properties/tint/properties/frames"},"g":{"maximum":255,"minimum":0,"type":"integer"},"intensity":{"maximum":255,"minimum":0,"type":"integer"},"r":{"maximum":255,"minimum":0,"type":"integer"},"wait":{"$ref":"#/properties/tree/items/anyOf/8/properties/battle/properties/canEscape"}},"required":["r","g","b","intensity"],"type":"object"}},"required":["flash"],"type":"object"},{"additionalProperties":false,"properties":{"shake":{"additionalProperties":false,"properties":{"frames":{"$ref":"#/properties/tree/items/anyOf/11/properties/tint/properties/frames"},"power":{"maximum":9,"minimum":1,"type":"integer"},"speed":{"maximum":9,"minimum":1,"type":"integer"},"wait":{"$ref":"#/properties/tree/items/anyOf/8/properties/battle/properties/canEscape"}},"type":"object"}},"required":["shake"],"type":"object"},{"additionalProperties":false,"properties":{"weather":{"additionalProperties":false,"properties":{"frames":{"$ref":"#/properties/tree/items/anyOf/11/properties/tint/properties/frames"},"power":{"maximum":9,"minimum":1,"type":"integer"},"type":{"enum":["none","rain","storm","snow"],"type":"string"},"wait":{"$ref":"#/properties/tree/items/anyOf/8/properties/battle/properties/canEscape"}},"required":["type"],"type":"object"}},"required":["weather"],"type":"object"},{"additionalProperties":false,"properties":{"playAudio":{"additionalProperties":false,"properties":{"kind":{"enum":["bgm","bgs","me","se"],"type":"string"},"name":{"maxLength":255,"pattern":"^[^\\u0000-\\u001f\\u007f]*$","type":"string"},"pan":{"maximum":100,"minimum":-100,"type":"integer"},"pitch":{"maximum":150,"minimum":50,"type":"integer"},"volume":{"maximum":100,"minimum":0,"type":"integer"}},"required":["kind","name"],"type":"object"}},"required":["playAudio"],"type":"object"},{"additionalProperties":false,"properties":{"fadeAudio":{"additionalProperties":false,"properties":{"kind":{"enum":["bgm","bgs"],"type":"string"},"seconds":{"maximum":60,"minimum":1,"type":"integer"}},"required":["kind","seconds"],"type":"object"}},"required":["fadeAudio"],"type":"object"},{"additionalProperties":false,"properties":{"showPicture":{"additionalProperties":false,"properties":{"blend":{"enum":["normal","add","multiply","screen"],"type":"string"},"id":{"maximum":100,"minimum":1,"type":"integer"},"name":{"maxLength":255,"minLength":1,"pattern":"^[^\\u0000-\\u001f\\u007f]*$","type":"string"},"opacity":{"maximum":255,"minimum":0,"type":"integer"},"origin":{"enum":["upperLeft","center"],"type":"string"},"scaleX":{"maximum":2000,"minimum":0,"type":"integer"},"scaleY":{"maximum":2000,"minimum":0,"type":"integer"},"x":{"type":"integer"},"y":{"type":"integer"}},"required":["id","name","x","y"],"type":"object"}},"required":["showPicture"],"type":"object"},{"additionalProperties":false,"properties":{"erasePicture":{"maximum":100,"minimum":1,"type":"integer"}},"required":["erasePicture"],"type":"object"},{"additionalProperties":false,"properties":{"animation":{"additionalProperties":false,"properties":{"animationId":{"minimum":1,"type":"integer"},"target":{"anyOf":[{"const":"player","type":"string"},{"const":"this","type":"string"},{"minimum":1,"type":"integer"}]},"wait":{"$ref":"#/properties/tree/items/anyOf/8/properties/battle/properties/canEscape"}},"required":["target","animationId"],"type":"object"}},"required":["animation"],"type":"object"},{"additionalProperties":false,"properties":{"balloon":{"additionalProperties":false,"properties":{"balloonId":{"maximum":10,"minimum":1,"type":"integer"},"target":{"$ref":"#/properties/tree/items/anyOf/19/properties/animation/properties/target"},"wait":{"$ref":"#/properties/tree/items/anyOf/8/properties/battle/properties/canEscape"}},"required":["target","balloonId"],"type":"object"}},"required":["balloon"],"type":"object"},{"additionalProperties":false,"properties":{"moveRoute":{"additionalProperties":false,"properties":{"repeat":{"$ref":"#/properties/tree/items/anyOf/8/properties/battle/properties/canEscape"},"skippable":{"$ref":"#/properties/tree/items/anyOf/8/properties/battle/properties/canEscape"},"steps":{"items":{},"maxItems":100,"minItems":1,"type":"array"},"target":{"$ref":"#/properties/tree/items/anyOf/19/properties/animation/properties/target"},"wait":{"$ref":"#/properties/tree/items/anyOf/8/properties/battle/properties/canEscape"}},"required":["target","steps"],"type":"object"}},"required":["moveRoute"],"type":"object"},{"additionalProperties":false,"properties":{"shop":{"additionalProperties":false,"properties":{"goods":{"items":{"additionalProperties":false,"properties":{"id":{"minimum":1,"type":"integer"},"price":{"minimum":0,"type":"integer"},"type":{"enum":["item","weapon","armor"],"type":"string"}},"required":["type","id"],"type":"object"},"maxItems":40,"minItems":1,"type":"array"},"purchaseOnly":{"$ref":"#/properties/tree/items/anyOf/8/properties/battle/properties/canEscape"}},"required":["goods"],"type":"object"}},"required":["shop"],"type":"object"},{"additionalProperties":false,"properties":{"callCommon":{"minimum":1,"type":"integer"}},"required":["callCommon"],"type":"object"},{"additionalProperties":false,"properties":{"label":{"minLength":1,"pattern":"^[^\\u0000-\\u001f\\u007f\\u0085\\u2028\\u2029]*$","type":"string"}},"required":["label"],"type":"object"},{"additionalProperties":false,"properties":{"jump":{"minLength":1,"pattern":"^[^\\u0000-\\u001f\\u007f\\u0085\\u2028\\u2029]*$","type":"string"}},"required":["jump"],"type":"object"},{"additionalProperties":false,"properties":{"exit":{"const":true,"type":"boolean"}},"required":["exit"],"type":"object"},{"additionalProperties":false,"properties":{"comment":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]}},"required":["comment"],"type":"object"},{"additionalProperties":false,"properties":{"gold":{"maximum":99999999,"minimum":-99999999,"type":"integer"}},"required":["gold"],"type":"object"},{"additionalProperties":false,"properties":{"item":{"additionalProperties":false,"properties":{"count":{"maximum":99,"minimum":-99,"type":"integer"},"id":{"minimum":1,"type":"integer"},"kind":{"enum":["item","weapon","armor"],"type":"string"}},"required":["kind","id","count"],"type":"object"}},"required":["item"],"type":"object"},{"additionalProperties":false,"properties":{"party":{"additionalProperties":false,"properties":{"action":{"enum":["add","remove"],"type":"string"},"actorId":{"minimum":1,"type":"integer"},"initialize":{"$ref":"#/properties/tree/items/anyOf/8/properties/battle/properties/canEscape"}},"required":["actorId","action"],"type":"object"}},"required":["party"],"type":"object"},{"additionalProperties":false,"properties":{"learnSkill":{"additionalProperties":false,"properties":{"actorId":{"$ref":"#/properties/tree/items/anyOf/30/properties/party/properties/actorId"},"forget":{"$ref":"#/properties/tree/items/anyOf/8/properties/battle/properties/canEscape"},"skillId":{"minimum":1,"type":"integer"}},"required":["actorId","skillId"],"type":"object"}},"required":["learnSkill"],"type":"object"},{"additionalProperties":false,"properties":{"recoverAll":{"const":true,"type":"boolean"}},"required":["recoverAll"],"type":"object"},{"additionalProperties":false,"properties":{"nameInput":{"additionalProperties":false,"properties":{"actorId":{"$ref":"#/properties/tree/items/anyOf/30/properties/party/properties/actorId"},"maxChars":{"maximum":16,"minimum":1,"type":"integer"}},"required":["actorId","maxChars"],"type":"object"}},"required":["nameInput"],"type":"object"},{"additionalProperties":false,"properties":{"plugin":{"minLength":1,"pattern":"^[^\\u0000-\\u001f\\u007f\\u0085\\u2028\\u2029]*$","type":"string"}},"required":["plugin"],"type":"object"},{"additionalProperties":false,"properties":{"scene":{"enum":["menu","save","gameOver","title"],"type":"string"}},"required":["scene"],"type":"object"}]},"minItems":1,"type":"array"}},"required":["tree"],"type":"object"},"name":"build_dialogue_tree","title":"Build dialogue tree"},{"description":"Creates a complete, ready-to-use map event at (x, y) from a template, in one write. Refuses out-of-bounds tiles, and refuses a tile that already holds an event unless allowStack is true. Graphics default to none: events are INVISIBLE in game until an image is supplied (chest: closedImage/openImage, npc: image; locked_door, inn, shop and save_point never get a graphic and are meant to sit on a tile that already looks right). Templates and their params: chest {reward: {gold?, item?: {type: item|weapon|armor, id, count?}}, message?, closedImage?, openImage?} (two pages: the action button opens it and sets self switch A, then an empty opened page; if only closedImage is given, openImage defaults to the same graphic with direction 8 - the opened-chest frame of the standard chest sheets); locked_door {keyItemId, destination: {mapId, x, y, direction?: 0|2|4|6|8}, lockedMessage?, consumeKey?} (transfers the player if the party holds the key); inn {price, greeting?} (Stay/Leave choice; staying charges gold, fades out, restores the party, fades in); shop {goods: [{type: item|weapon|armor, id, price?}] (1-40; price defaults to the database price), purchaseOnly?}; save_point {} (opens the save screen); npc {lines: string[], face?: {name, index}, image?}. Image = {characterName, characterIndex (0-7), direction?: 2|4|6|8, pattern?: 0|1|2}. Returns { eventId, name, pages }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"allowStack":{"default":false,"description":"Allow placing the event on a tile that already has an event","type":"boolean"},"closedImage":{"additionalProperties":false,"description":"chest: graphic before opening","properties":{"characterIndex":{"description":"Which of the 8 characters on the sheet (0-7)","maximum":7,"minimum":0,"type":"integer"},"characterName":{"description":"Character sheet name in img/characters, e.g. \"People1\" or \"!Chest\"","type":"string"},"direction":{"description":"Facing, default 2 (down)","enum":[2,4,6,8],"type":"number"},"pattern":{"description":"Animation frame, default 1 (middle)","enum":[0,1,2],"type":"number"}},"required":["characterName","characterIndex"],"type":"object"},"consumeKey":{"description":"locked_door: remove one key on use","type":"boolean"},"destination":{"additionalProperties":false,"description":"locked_door: { mapId, x, y, direction?: 0|2|4|6|8 }","properties":{"direction":{"enum":[0,2,4,6,8],"type":"number"},"mapId":{"minimum":1,"type":"integer"},"x":{"minimum":0,"type":"integer"},"y":{"minimum":0,"type":"integer"}},"required":["mapId","x","y"],"type":"object"},"face":{"additionalProperties":false,"description":"npc: face portrait { name, index }","properties":{"index":{"maximum":7,"minimum":0,"type":"integer"},"name":{"type":"string"}},"required":["name","index"],"type":"object"},"goods":{"description":"shop: 1-40 entries { type: item|weapon|armor, id, price? }; omit price for the database price","items":{"additionalProperties":false,"properties":{"id":{"minimum":1,"type":"integer"},"price":{"minimum":0,"type":"integer"},"type":{"$ref":"#/properties/reward/properties/item/properties/type"}},"required":["type","id"],"type":"object"},"type":"array"},"greeting":{"description":"inn: text shown first","type":"string"},"image":{"$ref":"#/properties/closedImage","description":"npc: the NPC's character graphic"},"keyItemId":{"description":"locked_door: item id of the key","type":"integer"},"lines":{"description":"npc: lines of dialogue (4 per message box)","items":{"type":"string"},"type":"array"},"lockedMessage":{"description":"locked_door: text when the player has no key (default \"It's locked.\")","type":"string"},"mapId":{"minimum":1,"type":"integer"},"message":{"description":"chest: text shown when opened (default \"You found treasure!\")","type":"string"},"name":{"description":"Event name; defaults to the template name (Chest, Door, Inn, Shop, Save Point, NPC)","type":"string"},"openImage":{"$ref":"#/properties/closedImage","description":"chest: graphic after opening (default: closedImage facing up)"},"price":{"description":"inn: gold per night (>= 0)","type":"integer"},"purchaseOnly":{"description":"shop: disable selling","type":"boolean"},"reward":{"additionalProperties":false,"description":"chest: { gold?: number, item?: {type: item|weapon|armor, id, count?} }, at least one","properties":{"gold":{"minimum":1,"type":"integer"},"item":{"additionalProperties":false,"properties":{"count":{"minimum":1,"type":"integer"},"id":{"minimum":1,"type":"integer"},"type":{"enum":["item","weapon","armor"],"type":"string"}},"required":["type","id"],"type":"object"}},"type":"object"},"template":{"description":"Which template to build; the other fields depend on it","enum":["chest","locked_door","inn","shop","save_point","npc"],"type":"string"},"x":{"minimum":0,"type":"integer"},"y":{"minimum":0,"type":"integer"}},"required":["mapId","x","y","template"],"type":"object"},"name":"create_event_from_template","title":"Create event from template"},{"description":"Procedurally generate a dungeon (rooms joined by corridors) or a cave (organic, one connected region) and paint it with a tile profile. Give exactly one of `mapId` (generate into an existing map, using its size and tileset) or `create` (make a new map and register it in MapInfos.json). An existing map that has any tile or any event is refused unless `overwrite` is true; overwrite resets every tile layer and removes all events. `seed` makes the result repeatable; when omitted a random seed is picked, and the seed used is always returned. The profile (floor, wall, optional wallTop, optional weighted decor) defaults to suggestTileProfile, which works from the tileset's data only: the lowest-numbered walkable A2 kind as floor (else the first walkable A5 tile), the lowest-numbered blocking A4 wall kind as wall with the floor-rule A4 kind above it as wall top (else the first blocking A5 or B tile), and no decor. The profile used and the reasoning are returned as profileUsed and profileNotes. Nothing is written when the profile's floor is not walkable, its wall or wall top does not block movement, a sheet has no image, or the painted map is not fully reachable from the entrance. Markers are empty placeholder events at priority 0 (below characters, so they never block the player) named Entrance, Exit and Chest 1..n, placed on floor cells; chests are random floor cells away from the entrance and exit, chosen so that no chest cuts off any part of the map. `markers` defaults to {entrance: true, exit: true, chests: 0}. The result lists each marker's eventId and position under `markers`. Afterwards: call render_map_image to look at the result (consider showPassability); wire doors to other maps with connect_maps using the returned entrance and exit coordinates; fill the chest markers with create_event_from_template or the event tools. A marker occupies its tile: delete it with delete_event before placing a door or chest there, or pass allowOverlap (connect_maps) / allowStack (create_event_from_template) to place on top of it. A dungeon needs a map of at least 14x7 (or 7x14) cells; smaller maps are refused with a clear error (caves are reliable from about 13x13, and MV's default 17x13 never failed in testing; 9x9 to 12x12 and thin maps fail for many seeds, so try another seed or a larger map). Limits: decor is best-effort (sparse, only on open floor), and wall faces are a one-row simplification, since many tilesets draw wall sides two or more tiles tall.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"create":{"additionalProperties":false,"description":"New map to create (use instead of `mapId`)","properties":{"height":{"maximum":256,"minimum":5,"type":"integer"},"name":{"minLength":1,"type":"string"},"parentId":{"default":0,"description":"Parent map id in the editor tree (0 = top level)","minimum":0,"type":"integer"},"tilesetId":{"minimum":1,"type":"integer"},"width":{"maximum":256,"minimum":5,"type":"integer"}},"required":["name","width","height","tilesetId"],"type":"object"},"kind":{"enum":["dungeon","cave"],"type":"string"},"mapId":{"description":"Existing map to generate into (use instead of `create`)","minimum":1,"type":"integer"},"markers":{"additionalProperties":false,"properties":{"chests":{"default":0,"maximum":20,"minimum":0,"type":"integer"},"entrance":{"default":true,"type":"boolean"},"exit":{"default":true,"type":"boolean"}},"type":"object"},"overwrite":{"default":false,"description":"Allow replacing a map that already has tiles or events","type":"boolean"},"profile":{"additionalProperties":false,"description":"Tiles to paint with; defaults to a suggestion from the tileset","properties":{"decor":{"description":"Optional decoration tiles scattered on the floor, picked in proportion to their weight","items":{"additionalProperties":false,"properties":{"tile":{"$ref":"#/properties/profile/properties/wallTop"},"weight":{"exclusiveMinimum":0,"type":"number"}},"required":["tile","weight"],"type":"object"},"type":"array"},"floor":{"anyOf":[{"maximum":8191,"minimum":0,"type":"integer"},{"additionalProperties":false,"properties":{"index":{"description":"Tile index, for sheets A5 (0-127) and B-E (0-255)","type":"integer"},"kind":{"description":"Autotile kind, for sheets A1-A4 (A1 0-15, A2 16-47, A3 48-79, A4 80-127)","type":"integer"},"sheet":{"enum":["A1","A2","A3","A4","A5","B","C","D","E"],"type":"string"}},"required":["sheet"],"type":"object"}],"description":"Tile for walkable floor cells"},"wall":{"anyOf":[{"$ref":"#/properties/profile/properties/floor/anyOf/0"},{"$ref":"#/properties/profile/properties/floor/anyOf/1"}],"description":"Tile for wall cells (should be impassable)"},"wallTop":{"anyOf":[{"$ref":"#/properties/profile/properties/floor/anyOf/0"},{"$ref":"#/properties/profile/properties/floor/anyOf/1"}],"description":"Optional tile for the top of walls, e.g. an A4 wall-top kind"}},"required":["floor","wall"],"type":"object"},"seed":{"description":"Same seed, size and options give the same layout; random when omitted","type":"integer"}},"required":["kind"],"type":"object"},"name":"generate_map","title":"Generate map"},{"description":"Save a rectangle of a map as a reusable stamp in <project>/.mcp-stamps/<name>.json: all six layers (tiles, shadow bits, regions) and, with includeEvents (default true), the events standing inside it. Use place_stamp to paste it onto any map of the same tileset. Width and height are 1-64 and the whole rectangle must lie inside the map. Names are 1-64 characters (letters, digits, space, _ and -, starting with a letter or digit). An existing stamp is only replaced when overwrite is true. Stamps are written like any project file, so inside an open changeset they are only staged until commit_changeset. Add .mcp-stamps/ to .gitignore next to .mcp-backups/ unless you want to share stamps.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"height":{"maximum":64,"minimum":1,"type":"integer"},"includeEvents":{"default":true,"description":"Also capture the events inside the rectangle","type":"boolean"},"mapId":{"minimum":1,"type":"integer"},"name":{"description":"Stamp name, e.g. \"well\" or \"Tavern 2\"","type":"string"},"overwrite":{"default":false,"description":"Replace a stamp that already has this name","type":"boolean"},"width":{"maximum":64,"minimum":1,"type":"integer"},"x":{"minimum":0,"type":"integer"},"y":{"minimum":0,"type":"integer"}},"required":["mapId","x","y","width","height","name"],"type":"object"},"name":"capture_stamp","title":"Capture stamp"},{"description":"Paste a stamp made with capture_stamp onto a map with its top-left corner at (x, y). The whole stamp must fit inside the map (it is never clipped) and the map must use the same tileset the stamp was captured from. The rectangle is REPLACED on every layer: empty stamp cells erase what was there. Autotile cells (A1-A4) are re-shaped so their edges blend with the surroundings, including the cells next to the stamp; all other tiles, shadow bits and regions are copied as they are. With includeEvents (default true) the stamp's events are added with new ids and moved to the placement; if one would land on a cell that already has an event, nothing is placed and the cells are listed (includeEvents: false places only the tiles). There is no rotate or mirror. A backup of the map is kept.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"includeEvents":{"default":true,"type":"boolean"},"mapId":{"minimum":1,"type":"integer"},"name":{"description":"Stamp name","type":"string"},"x":{"description":"Left edge of the placement","minimum":0,"type":"integer"},"y":{"description":"Top edge of the placement","minimum":0,"type":"integer"}},"required":["mapId","x","y","name"],"type":"object"},"name":"place_stamp","title":"Place stamp"},{"description":"List the stamps saved in <project>/.mcp-stamps/ (name, size, tilesetId, event count), sorted by name. Stamps captured inside a changeset that is still open are not listed until it is committed.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"list_stamps","title":"List stamps"},{"description":"Copy an image or sound file from this computer into the project: <project>/<folder>/<name>.<ext>. source must be an absolute local path to a regular file (no relative paths, network/UNC shares, devices or symbolic links). The type is read from the file's header, never its extension: img/* folders take files with a PNG header (max 32 MiB; only the signature + IHDR is checked, not the whole image), audio/* folders take files whose header is Ogg (OggS) or ISO-BMFF/M4A (ftyp) (max 128 MiB; only the header is checked, not the codec or the full file); the extension (.png, .ogg, .m4a) is chosen from the detected header. name defaults to the source file name without its extension and must be 1-64 characters from A-Z a-z 0-9 space _ ! $ ( ) - (no dots, no path); a '$' prefix on a character sheet means one character per sheet, '!' means no offset. An existing file with the same name (letter case ignored) is only replaced with overwrite: true; the session backup (list_backups / restore_backup) keeps the file as it was before this server session first touched it (until set_project is called again, which starts the snapshots over), so a file that was itself created or changed earlier in the same session has no backup of that intermediate version. Nothing is converted or resized; warnings flag sheet sizes that do not fit the folder's layout, and for audio a missing sibling format (MV's web build needs both .ogg and .m4a). Refused while a changeset is open (binary files cannot be staged): commit or discard it first.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"folder":{"description":"Destination asset folder, e.g. img/characters or audio/bgm","enum":["img/animations","img/battlebacks1","img/battlebacks2","img/characters","img/enemies","img/faces","img/parallaxes","img/pictures","img/sv_actors","img/sv_enemies","img/system","img/tilesets","img/titles1","img/titles2","audio/bgm","audio/bgs","audio/me","audio/se"],"type":"string"},"name":{"description":"File name without extension; defaults to the source's base name","type":"string"},"overwrite":{"default":false,"description":"Replace an existing file with this name","type":"boolean"},"source":{"description":"Absolute path of the file to import, e.g. C:\\art\\Hero.png or /home/me/art/Hero.png","type":"string"}},"required":["source","folder"],"type":"object"},"name":"import_asset","title":"Import asset"},{"description":"List the image and sound files in the project's asset folders (img/* and audio/*, 18 folders; all of them or one `folder`). Each file shows its name (without extension), ext, size in bytes and, for images, the pixel size read from the PNG header, plus warnings (a header that does not match the extension, or a sheet size that does not fit the folder). Only the first 64 bytes of each file are read, so a sound's type is judged from its header alone, not the codec or the whole file. Sub-directories and files with other extensions (.rpgmvp, .txt, ...) are skipped. With includeUsage (default true), files in the folders the reference scan covers (all except img/system and img/animations) get usedBy (at most 3 places, e.g. 'Actor 1', 'Map003 event 5') and unused (true when nothing in the database, maps, common events or troops references the name). Names are matched case-sensitively, so a reference that differs only in letter case shows the file as unused: run audit_assets to find case mismatches and missing files. A plugin or script that loads a file by name is not seen, so check before deleting. Files with names outside the import rule (dots, non-ASCII) are listed too, but preview_asset cannot open them. Interlaced PNGs are flagged in warnings. A folder that cannot be read gets an `error` on its entry instead of failing the listing. Files are sorted by name; each folder shows at most `limit` files and `truncated` counts the rest.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"folder":{"description":"Only this folder, e.g. img/characters; omit for all folders","enum":["img/animations","img/battlebacks1","img/battlebacks2","img/characters","img/enemies","img/faces","img/parallaxes","img/pictures","img/sv_actors","img/sv_enemies","img/system","img/tilesets","img/titles1","img/titles2","audio/bgm","audio/bgs","audio/me","audio/se"],"type":"string"},"includeUsage":{"default":true,"description":"Add usedBy/unused (scans the project's data files)","type":"boolean"},"limit":{"default":200,"description":"Maximum files listed per folder","maximum":1000,"minimum":1,"type":"integer"}},"type":"object"},"name":"list_assets","title":"List assets"},{"description":"Show a PNG from an img/* folder as an image so you can see it, with its pixel size, file size and, for img/characters and img/faces, the sheet layout implied by the name and size. name is the file name without .png and must match an existing file exactly (see list_assets). The image is scaled down (nearest neighbour, aspect kept) to at most maxSize pixels on its longer edge; smaller images are shown as they are. Files over 32 MiB or 16 million pixels, interlaced PNGs and files that are not valid PNGs are refused. Only names that pass the asset name rule (1-64 characters from A-Z a-z 0-9 space _ ! $ ( ) -) can be opened, even though list_assets may show files with other names. Audio cannot be previewed.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"folder":{"description":"Image folder, e.g. img/characters","enum":["img/animations","img/battlebacks1","img/battlebacks2","img/characters","img/enemies","img/faces","img/parallaxes","img/pictures","img/sv_actors","img/sv_enemies","img/system","img/tilesets","img/titles1","img/titles2"],"type":"string"},"maxSize":{"default":512,"description":"Longest edge of the returned image in pixels","maximum":1024,"minimum":32,"type":"integer"},"name":{"description":"File name without extension, e.g. Actor1","type":"string"}},"required":["folder","name"],"type":"object"},"name":"preview_asset","title":"Preview asset"},{"description":"Copy the bundled RPG Maker skill files (workflow guides for map building, event writing, balancing, localization, plugins) into the project's .claude/skills folder so Claude Code picks them up automatically in that project. The same files are always available as resources (rpgmaker://skills/<name>). Existing skill folders are skipped unless overwrite=true.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"overwrite":{"default":false,"description":"Replace skill files that already exist","type":"boolean"},"scope":{"default":"project","description":"'project' = <project>/.claude/skills, 'user' = ~/.claude/skills (all your projects)","enum":["project","user"],"type":"string"},"skills":{"description":"Only these skill names (default: all)","items":{"type":"string"},"type":"array"}},"type":"object"},"name":"install_skills","title":"Install skill files"}]}}}
