{"at":"2026-11-23T00:04:54.875Z","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-23T00:04:55.450Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T00:04:55.601Z","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-23T00:04:56.155Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{"listChanged":true}},"protocolVersion":"2025-11-25","serverInfo":{"name":"rpgmaker-mz-server","version":"1.4.0"}}}}
{"at":"2026-11-23T00:04:56.155Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T00:04:56.155Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T00:04:56.174Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"Get the project directory the server is currently operating on: its path, whether it is a valid RPG Maker MZ project, and the game title it holds.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"get_project"},{"description":"Point the server at a different RPG Maker MZ project directory for the rest of the session (overrides RPGMAKER_PROJECT_PATH until the server restarts). The directory must contain game.rmmzproject and data/System.json.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"path":{"description":"Path to the RPG Maker MZ project directory (a leading ~ is expanded).","type":"string"}},"required":["path"],"type":"object"},"name":"set_project"},{"description":"Update an actor's properties","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"actorId":{"description":"The ID of the actor to update","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"updates":{"additionalProperties":{},"description":"Object containing actor properties to update","propertyNames":{"type":"string"},"type":"object"}},"required":["actorId","updates"],"type":"object"},"name":"update_actor"},{"description":"Create a new actor in data/Actors.json. Only `name` is required; omitted fields use the editor's new-actor defaults (class 1, level 1-99, five empty equip slots, no traits). Allocates and returns the next unused actor id. NOTE: an actor's physical accuracy comes from its class + own traits — a class/actor with no Hit Rate trait (xparam id 0: trait { code: 22, dataId: 0, value: 0.95 }) always misses physical actions. The built-in class 1 has one; a custom class needs it added.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"battlerName":{"type":"string"},"characterIndex":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"characterName":{"type":"string"},"classId":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"equips":{"items":{"type":"number"},"type":"array"},"faceIndex":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"faceName":{"type":"string"},"initialLevel":{"type":"number"},"maxLevel":{"type":"number"},"name":{"type":"string"},"nickname":{"type":"string"},"note":{"type":"string"},"profile":{"type":"string"},"traits":{"items":{},"type":"array"}},"required":["name"],"type":"object"},"name":"create_actor"},{"description":"Search actors by name or nickname","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"searchTerm":{"description":"The search term to find actors","type":"string"}},"required":["searchTerm"],"type":"object"},"name":"search_actors"},{"description":"Create a new item in data/Items.json. Only `name` is worth passing; omitted fields use the editor's new-item defaults (Regular Item, consumable, no effects). Allocates and returns the next unused item id. An effect referencing a missing record throws: Add/Remove State (code 21/22) → state, Learn Skill (43) → skill, Common Event (44) → common event.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"animationId":{"description":"Animation id shown on use","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"consumable":{"description":"Consumed on use","type":"boolean"},"damage":{"additionalProperties":{},"description":"Damage object { type, elementId, formula, variance, critical }","propertyNames":{"type":"string"},"type":"object"},"description":{"description":"In-game description text","type":"string"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"effects":{"description":"Effect objects { code, dataId, value1, value2 }","items":{},"type":"array"},"hitType":{"description":"0 certain, 1 physical, 2 magical","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"iconIndex":{"description":"Icon index (IconSet.png)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"itypeId":{"description":"Item type: 1 Regular, 2 Key Item, 3 Hidden A, 4 Hidden B","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"description":"Item name","type":"string"},"note":{"description":"Note field","type":"string"},"occasion":{"description":"Usable: 0 always, 1 battle, 2 menu, 3 never","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"price":{"description":"Buy price (sells for half)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"repeats":{"description":"Number of hits/repeats","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"scope":{"description":"Target scope (0 none, 1 one enemy, 7 one ally, …)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"speed":{"description":"Speed correction (positive acts earlier)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"successRate":{"description":"Success rate percent","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"tpGain":{"description":"User TP gained on use","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["name"],"type":"object"},"name":"create_item"},{"description":"Update an item's properties (shallow merge into the existing record)","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"itemId":{"description":"The ID of the item to update","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"updates":{"additionalProperties":{},"description":"Object containing item properties to update","propertyNames":{"type":"string"},"type":"object"}},"required":["itemId","updates"],"type":"object"},"name":"update_item"},{"description":"Search items by name or description","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"searchTerm":{"description":"The search term to find items","type":"string"}},"required":["searchTerm"],"type":"object"},"name":"search_items"},{"description":"Create a new weapon in data/Weapons.json. Only `name` is required; omitted fields use the editor's new-weapon defaults (Weapon equip slot, no stat bonuses). `params` is a flat 8-length stat bonus [maxHP, maxMP, atk, def, mat, mdf, agi, luk]. Allocates and returns the next unused weapon id.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"animationId":{"description":"Attack animation id","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"description":{"description":"In-game description text","type":"string"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"iconIndex":{"description":"Icon index (IconSet.png)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"description":"Weapon name","type":"string"},"note":{"description":"Note field","type":"string"},"params":{"description":"8 flat stat bonuses [maxHP, maxMP, atk, def, mat, mdf, agi, luk]","items":{"type":"number"},"maxItems":8,"minItems":8,"type":"array"},"price":{"description":"Buy price","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"traits":{"description":"Trait objects { code, dataId, value }","items":{},"type":"array"},"wtypeId":{"description":"Weapon type id (System.json weaponTypes)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["name"],"type":"object"},"name":"create_weapon"},{"description":"Update a weapon's properties (shallow merge into the existing record)","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"updates":{"additionalProperties":{},"description":"Object containing weapon properties to update","propertyNames":{"type":"string"},"type":"object"},"weaponId":{"description":"The ID of the weapon to update","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["weaponId","updates"],"type":"object"},"name":"update_weapon"},{"description":"Create a new armor in data/Armors.json. Only `name` is required; omitted fields use the editor's new-armor defaults (Shield equip slot, no stat bonuses). `params` is a flat 8-length stat bonus; `etypeId` is the equip slot (System.json equipTypes: 2 Shield, 3 Head, 4 Body, 5 Accessory). Allocates and returns the next unused armor id.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"atypeId":{"description":"Armor type id (System.json armorTypes)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"description":{"description":"In-game description text","type":"string"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"etypeId":{"description":"Equip slot (equipTypes: 2 Shield, 3 Head, 4 Body, 5 Accessory)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"iconIndex":{"description":"Icon index (IconSet.png)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"description":"Armor name","type":"string"},"note":{"description":"Note field","type":"string"},"params":{"description":"8 flat stat bonuses [maxHP, maxMP, atk, def, mat, mdf, agi, luk]","items":{"type":"number"},"maxItems":8,"minItems":8,"type":"array"},"price":{"description":"Buy price","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"traits":{"description":"Trait objects { code, dataId, value }","items":{},"type":"array"}},"required":["name"],"type":"object"},"name":"create_armor"},{"description":"Update an armor's properties (shallow merge into the existing record)","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"armorId":{"description":"The ID of the armor to update","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"updates":{"additionalProperties":{},"description":"Object containing armor properties to update","propertyNames":{"type":"string"},"type":"object"}},"required":["armorId","updates"],"type":"object"},"name":"update_armor"},{"description":"Create a new skill with custom properties. Omitted fields use new-skill defaults: stypeId 1 (Magic), scope 1, occasion 1 (battle only), hitType derived — 0 certain for recovery or ally/user scopes, else 2 magical for Magic skills, else 1 physical if it deals damage, else 0. An effect referencing a missing record throws: Add/Remove State (code 21/22) → state, Learn Skill (43) → skill, Common Event (44) → common event.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"animationId":{"description":"Animation ID","maximum":9007199254740991,"minimum":0,"type":"integer"},"damage":{"description":"Damage configuration","properties":{"critical":{"type":"boolean"},"elementId":{"description":"Element ID (0=none, 2=fire, 3=ice, etc.)","maximum":9007199254740991,"minimum":0,"type":"integer"},"formula":{"description":"Damage formula (e.g., \"a.mat * 4 - b.mdf * 2\")","type":"string"},"type":{"description":"Damage type (0=none, 1=HP damage, 3=HP recover, etc.)","maximum":9007199254740991,"minimum":0,"type":"integer"},"variance":{"type":"number"}},"type":"object"},"description":{"description":"Skill description","type":"string"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"effects":{"description":"Skill effects (buffs, debuffs, states, etc.)","items":{},"type":"array"},"hitType":{"description":"0 certain hit, 1 physical (HIT/EVA, counterable), 2 magical (MEV, reflectable). Default derived from stypeId/scope/damage","maximum":2,"minimum":0,"type":"integer"},"iconIndex":{"description":"Icon index (0-1000+)","maximum":9007199254740991,"minimum":0,"type":"integer"},"message1":{"description":"Battle message (line 1, %1 = user name)","type":"string"},"message2":{"description":"Battle message line 2","type":"string"},"mpCost":{"description":"MP cost","type":"number"},"name":{"description":"Skill name","type":"string"},"note":{"description":"Note field (notetags)","type":"string"},"occasion":{"description":"Usable: 0 always, 1 battle only (default), 2 menu only, 3 never","maximum":3,"minimum":0,"type":"integer"},"repeats":{"description":"Number of hits (1-9). Default 1","maximum":9007199254740991,"minimum":1,"type":"integer"},"requiredWtypeId1":{"description":"Required weapon type 1 (0=none)","maximum":9007199254740991,"minimum":0,"type":"integer"},"requiredWtypeId2":{"description":"Required weapon type 2 (0=none)","maximum":9007199254740991,"minimum":0,"type":"integer"},"scope":{"description":"Target scope (1=enemy single, 2=enemy all, 7=ally all, etc.)","maximum":9007199254740991,"minimum":0,"type":"integer"},"speed":{"description":"Speed correction (-2000..2000; positive acts earlier). Default 0","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"stypeId":{"description":"Skill type (0=none — typical for enemy-only skills, not sealed by Silence; 1=magic, 2=special, etc.). Default 1","maximum":9007199254740991,"minimum":0,"type":"integer"},"successRate":{"description":"Success rate percent. Default 100","maximum":100,"minimum":0,"type":"integer"},"tpCost":{"description":"TP cost","type":"number"},"tpGain":{"description":"User TP gained on use. Default 0","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["name"],"type":"object"},"name":"create_skill"},{"description":"Create a damage-dealing skill (simplified)","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"damageFormula":{"description":"Damage formula (e.g., \"a.mat * 4\")","type":"string"},"description":{"description":"Skill description","type":"string"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"elementId":{"description":"Element ID (0=none, 2=fire, 3=ice, 4=thunder)","maximum":9007199254740991,"minimum":0,"type":"integer"},"mpCost":{"description":"MP cost","type":"number"},"name":{"description":"Skill name","type":"string"},"scope":{"description":"Target scope (1=enemy single, 2=enemy all)","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["name","damageFormula","mpCost","scope"],"type":"object"},"name":"create_damage_skill"},{"description":"Create a healing skill (simplified)","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"description":{"description":"Skill description","type":"string"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"healFormula":{"description":"Heal formula (e.g., \"a.mat * 3 + 100\")","type":"string"},"mpCost":{"description":"MP cost","type":"number"},"name":{"description":"Skill name","type":"string"},"scope":{"description":"Target scope (7=ally all, 11=user)","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["name","healFormula","mpCost","scope"],"type":"object"},"name":"create_healing_skill"},{"description":"Create a buff skill (simplified)","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"buffType":{"description":"Buff type (2=ATK, 3=DEF, 4=MAT, 5=MDF, 6=AGI)","maximum":9007199254740991,"minimum":0,"type":"integer"},"description":{"description":"Skill description","type":"string"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"mpCost":{"description":"MP cost","type":"number"},"name":{"description":"Skill name","type":"string"},"scope":{"description":"Target scope (7=ally all, 11=user)","maximum":9007199254740991,"minimum":0,"type":"integer"},"turns":{"description":"Number of turns the buff lasts","type":"number"}},"required":["name","buffType","turns","mpCost","scope"],"type":"object"},"name":"create_buff_skill"},{"description":"Create a state-inflicting skill (poison, sleep, etc.). Throws if `stateId` does not exist in States.json (create the state first with create_state).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"chance":{"description":"Success chance (0.0-1.0)","type":"number"},"description":{"description":"Skill description","type":"string"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"mpCost":{"description":"MP cost","type":"number"},"name":{"description":"Skill name","type":"string"},"scope":{"description":"Target scope (1=enemy single, 2=enemy all)","maximum":9007199254740991,"minimum":0,"type":"integer"},"stateId":{"description":"State ID (4=poison, 5=blind, 6=silence, 8=confusion, etc.)","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["name","stateId","chance","mpCost","scope"],"type":"object"},"name":"create_state_skill"},{"description":"Update a skill's properties","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"skillId":{"description":"The skill ID to update","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"updates":{"additionalProperties":{},"description":"Properties to update","propertyNames":{"type":"string"},"type":"object"}},"required":["skillId","updates"],"type":"object"},"name":"update_skill"},{"description":"Search skills by name or description","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"searchTerm":{"description":"Search term","type":"string"}},"required":["searchTerm"],"type":"object"},"name":"search_skills"},{"description":"Get map data by ID. The tile `data` array can be huge on a painted map (width*height*6 ints) and blow the MCP token limit, so pass includeData:false to omit it (you get dataTileCount instead) and read tiles with get_map_region when needed. includeData defaults to true for backward compatibility.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"includeData":{"description":"Include the full tile `data` array (default true). Pass false to omit it (returns dataTileCount) and avoid the token cost of a big painted map.","type":"boolean"},"mapId":{"description":"The ID of the map to retrieve","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["mapId"],"type":"object"},"name":"get_map"},{"description":"Read the raw tile ids in a rectangular window of one map layer — a token-cheap alternative to get_map for inspecting part of a painted map. Returns `tiles` as a 2D array (rows top→bottom, each left→right) of raw engine tile ids. The rectangle must lie fully within the map bounds (throws otherwise). layer defaults to 0 (see set_map_tile for the z-layer meanings).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"height":{"description":"Window height in tiles","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"layer":{"description":"Z-layer 0-5 (0-1 lower, 2-3 upper, 4 shadow, 5 region); default 0","maximum":5,"minimum":0,"type":"integer"},"mapId":{"description":"The ID of the map","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"width":{"description":"Window width in tiles","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"x":{"description":"Left edge of the window (tile column)","maximum":9007199254740991,"minimum":0,"type":"integer"},"y":{"description":"Top edge of the window (tile row)","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["mapId","x","y","width","height"],"type":"object"},"name":"get_map_region"},{"description":"Get information about all maps","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"get_map_infos"},{"description":"Create a new blank map: writes a new data/MapNNN.json (all tiles unpainted) and registers it in the map tree (MapInfos.json). Allocates the next unused map id and returns it. Paint tiles afterward with paint_tiles/fill_area (autotile-aware) and add events with create_map_event/create_npc.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"height":{"description":"Height in tiles (default 13)","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"name":{"description":"Map name shown in the editor map tree","type":"string"},"parentId":{"description":"Parent map id in the tree; 0 (default) = top level","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"tilesetId":{"description":"Tileset id (default 1)","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"width":{"description":"Width in tiles (default 17)","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["name"],"type":"object"},"name":"create_map"},{"description":"Delete a map: remove its entry from the map tree (MapInfos.json) and delete its data/MapNNN.json file. The deleted map's direct children are reparented onto its parent (not deleted), so removing one node doesn't wipe a whole sub-tree. Does not touch System.json.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"mapId":{"description":"The ID of the map to delete","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["mapId"],"type":"object"},"name":"delete_map"},{"description":"Edit the map tree (MapInfos.json) only — reparent, reorder, rename, or expand/collapse maps without touching their tiles or events. Takes a batch of per-map updates; every referenced map (and any non-zero parentId) must exist, and the resulting tree must stay acyclic.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"updates":{"description":"One or more per-map tree edits to apply together","items":{"properties":{"expanded":{"description":"Whether the node is expanded in the tree","type":"boolean"},"mapId":{"description":"The map to update","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"name":{"description":"New tree display name","type":"string"},"order":{"description":"New sort order among siblings","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"parentId":{"description":"New parent map id; 0 = top level","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["mapId"],"type":"object"},"type":"array"}},"required":["updates"],"type":"object"},"name":"update_map_tree"},{"description":"Get all events from a specific map","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"mapId":{"description":"The ID of the map","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["mapId"],"type":"object"},"name":"get_map_events"},{"description":"Get a specific event from a map","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"eventId":{"description":"The ID of the event","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"mapId":{"description":"The ID of the map","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["mapId","eventId"],"type":"object"},"name":"get_map_event"},{"description":"Update a map event's properties. Refuses the write (nothing is saved) if the resulting event is structurally invalid — pass force: true to override.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"eventId":{"description":"The ID of the event","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"force":{"description":"Write even if validation finds structural problems (wrong parameter count, unterminated command list). Off by default: such a write is refused and nothing is written. Advisory warnings never block regardless.","type":"boolean"},"mapId":{"description":"The ID of the map","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"updates":{"additionalProperties":{},"description":"Object containing event properties to update","propertyNames":{"type":"string"},"type":"object"},"verbose":{"description":"Echo the full written record instead of the default summary. Off by default: the response reports identity, counts and command-list shape, which is what you would assert on, and omits the parameters/conditions you would only re-read. Read the full record with the matching get_* tool.","type":"boolean"}},"required":["mapId","eventId","updates"],"type":"object"},"name":"update_map_event"},{"description":"Create a new event on a map. Each page is merged onto a blank \"New Event\" page (trigger 0 action-button, priority 0 below characters, no graphic, empty command list, standing move type), so you only supply the fields that differ — pass e.g. `{ image: { characterName: 'Actor1', characterIndex: 0 }, trigger: 3, list: [...] }` and the rest is filled in. Nested `image`/`conditions` deep-merge; an omitted `list` becomes a valid empty (code-0-terminated) list. Omit `pages` entirely for a bare one-page event. For the common \"talking NPC\" case prefer create_npc. An action-button page meant to fire from facing (doors, entrances, signs) needs `priorityType: 1` — with the default 0 (below) it only fires when stood on, so on an impassable tile it can never trigger (this is refused, not written; pass force: true to override). A structurally invalid command list is refused the same way. A page with no graphic, priority 1 and through off on a walkable tile is an invisible wall — warned (not refused); give it priority 0 or through: true if it should be walked past. Exempt: an action-button page over a drawn upper-layer (B–E) object — the solid-landmark idiom. Page fields: `image` { characterName, characterIndex, direction (2 down/4 left/6 right/8 up), pattern, tileId }, `trigger` (0 action-button/1 player-touch/2 event-touch/3 autorun/4 parallel), `priorityType` (0 below/1 same/2 above), `moveType` (0 fixed/1 random/2 approach/3 custom), `conditions`, `list`.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"force":{"description":"Write even if validation finds structural problems (wrong parameter count, unterminated command list). Off by default: such a write is refused and nothing is written. Advisory warnings never block regardless.","type":"boolean"},"mapId":{"description":"The ID of the map","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"name":{"description":"Event name","type":"string"},"note":{"description":"Event note field","type":"string"},"pages":{"description":"Event pages; each is merged onto a blank page so you can pass only the differing fields. Omit for one blank page.","items":{"additionalProperties":{},"propertyNames":{"type":"string"},"type":"object"},"type":"array"},"x":{"description":"X tile position","maximum":9007199254740991,"minimum":0,"type":"integer"},"y":{"description":"Y tile position","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["mapId","name","x","y"],"type":"object"},"name":"create_map_event"},{"description":"Search events on a map by name","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"mapId":{"description":"The ID of the map","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"searchTerm":{"description":"The search term to find events","type":"string"}},"required":["mapId","searchTerm"],"type":"object"},"name":"search_map_events"},{"description":"Add a command to an event page. Refuses the write (nothing is saved) if the resulting page is structurally invalid — e.g. the command has the wrong parameter count for its code. Pass force: true to override.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"command":{"description":"The event command to insert","properties":{"code":{"description":"Event command code (see RPG Maker MZ documentation)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"indent":{"default":0,"description":"Indentation level","maximum":9007199254740991,"minimum":0,"type":"integer"},"parameters":{"description":"Command parameters","items":{},"type":"array"}},"required":["code","parameters"],"type":"object"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"eventId":{"description":"The ID of the event","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"force":{"description":"Write even if validation finds structural problems (wrong parameter count, unterminated command list). Off by default: such a write is refused and nothing is written. Advisory warnings never block regardless.","type":"boolean"},"mapId":{"description":"The ID of the map","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"pageIndex":{"description":"Zero-based page index","maximum":9007199254740991,"minimum":0,"type":"integer"},"position":{"description":"Insertion index; defaults to end of the list","maximum":9007199254740991,"minimum":0,"type":"integer"},"verbose":{"description":"Echo the full written record instead of the default summary. Off by default: the response reports identity, counts and command-list shape, which is what you would assert on, and omits the parameters/conditions you would only re-read. Read the full record with the matching get_* tool.","type":"boolean"}},"required":["mapId","eventId","pageIndex","command"],"type":"object"},"name":"add_event_command"},{"description":"Update a map's top-level properties (name, display name, bgm, encounters, etc.). Does not repaint tiles. Cannot change width/height (that would desync the tile data array) — use resize_map for that. The echo omits the tile `data` array and the `events` map (neither is touched here) and reports dataTileCount/eventCount instead; pass verbose: true or use get_map for the full record.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"mapId":{"description":"The ID of the map","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"updates":{"additionalProperties":{},"description":"Partial MapData properties to merge","propertyNames":{"type":"string"},"type":"object"},"verbose":{"description":"Echo the full written record instead of the default summary. Off by default: the response reports identity, counts and command-list shape, which is what you would assert on, and omits the parameters/conditions you would only re-read. Read the full record with the matching get_* tool.","type":"boolean"}},"required":["mapId","updates"],"type":"object"},"name":"update_map"},{"description":"Resize a map to new width/height, safely repadding every z-layer of its tile data (existing tiles kept where the old and new grids overlap; new cells blank; shrinking crops). This is the ONLY safe way to change a map's dimensions — update_map refuses a width/height change because it would not resize the tile array. Warns about any event left outside the new bounds.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"height":{"description":"New height in tiles","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"mapId":{"description":"The ID of the map to resize","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"verbose":{"description":"Echo the full written record instead of the default summary. Off by default: the response reports identity, counts and command-list shape, which is what you would assert on, and omits the parameters/conditions you would only re-read. Read the full record with the matching get_* tool.","type":"boolean"},"width":{"description":"New width in tiles","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["mapId","width","height"],"type":"object"},"name":"resize_map"},{"description":"Set a map's random-encounter list (replaces it wholesale) and optionally its encounterStep (average steps between encounters). Each encounter is { troopId, weight?, regionSet? }: weight biases the random pick (default 5), regionSet restricts it to those map region ids (empty/omitted = anywhere). Every troopId is validated against Troops.json — a non-existent troop throws. Prefer this over update_map for encounters (it validates and hides the on-disk shape).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"encounterStep":{"description":"Average number of steps between encounters (unchanged if omitted)","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"encounters":{"description":"The full encounter list to set (replaces any existing entries)","items":{"properties":{"regionSet":{"description":"Region ids this encounter is restricted to (empty = anywhere)","items":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"type":"array"},"troopId":{"description":"Troop id from Troops.json","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"weight":{"description":"Relative encounter weight (default 5)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["troopId"],"type":"object"},"type":"array"},"mapId":{"description":"The ID of the map","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["mapId","encounters"],"type":"object"},"name":"set_encounters"},{"description":"Get the width and height (in tiles) of a map","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"mapId":{"description":"The ID of the map","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["mapId"],"type":"object"},"name":"get_map_dimensions"},{"description":"Set a single raw tile ID at (x, y) on a given z-layer (0-5). Note: tile IDs are raw engine integers; this is a low-level primitive without autotile/passability awareness.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"layer":{"description":"Z-layer 0-5 (0-1 lower, 2-3 upper, 4 shadow, 5 region)","maximum":5,"minimum":0,"type":"integer"},"mapId":{"description":"The ID of the map","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"tileId":{"description":"Raw tile ID","maximum":9007199254740991,"minimum":0,"type":"integer"},"x":{"description":"X tile position","maximum":9007199254740991,"minimum":0,"type":"integer"},"y":{"description":"Y tile position","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["mapId","x","y","layer","tileId"],"type":"object"},"name":"set_map_tile"},{"description":"Delete an event from a map by ID","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"eventId":{"description":"The ID of the event","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"mapId":{"description":"The ID of the map","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["mapId","eventId"],"type":"object"},"name":"delete_map_event"},{"description":"Create a new enemy in data/Enemies.json. Only `name` is required; omitted fields use the editor's new-enemy defaults (100 HP, one Attack action, no drops). Allocates the next unused enemy id and returns `{ enemy, warnings? }` (warn-by-default: a `battlerName` not found in img/enemies (img/sv_enemies for a side-view project) is flagged, never blocked). Throws if an `actions[].skillId` or a `dropItems[].dataId` (item/weapon/armor by `kind`) references a record that does not exist. NOTE: an enemy with no Hit Rate trait (xparam id 0: trait { code: 22, dataId: 0, value: 0.95 }) always misses physical actions — pass one in `traits` if the enemy should land basic attacks.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"actions":{"description":"Action patterns { skillId, conditionType, conditionParam1, conditionParam2, rating }","items":{},"type":"array"},"battlerHue":{"description":"Battler hue rotation 0-360","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"battlerName":{"description":"Battler graphic filename (img/enemies; img/sv_enemies when System.optSideView)","type":"string"},"dropItems":{"description":"Drop-item objects { kind, dataId, denominator }","items":{},"type":"array"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"exp":{"description":"EXP granted when defeated","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"gold":{"description":"Gold granted when defeated","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"description":"Enemy name shown in battle and the database","type":"string"},"note":{"description":"Note field","type":"string"},"params":{"description":"8 base params: [maxHP, maxMP, atk, def, mat, mdf, agi, luk]","items":{"type":"number"},"maxItems":8,"minItems":8,"type":"array"},"traits":{"description":"Trait objects { code, dataId, value }","items":{},"type":"array"}},"required":["name"],"type":"object"},"name":"create_enemy"},{"description":"Update an enemy's properties (shallow merge into the existing record). Returns `{ enemy, warnings? }` — a `battlerName` not found in img/enemies (img/sv_enemies for a side-view project) is flagged warn-by-default.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"enemyId":{"description":"The ID of the enemy to update","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"updates":{"additionalProperties":{},"description":"Object containing enemy properties to update","propertyNames":{"type":"string"},"type":"object"}},"required":["enemyId","updates"],"type":"object"},"name":"update_enemy"},{"description":"Search enemies by name (case-insensitive)","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"searchTerm":{"description":"The search term to find enemies","type":"string"}},"required":["searchTerm"],"type":"object"},"name":"search_enemies"},{"description":"Create a new troop (enemy battle group) in data/Troops.json. `name` is required; `members` defaults to empty and `pages` to one blank battle-event page. Every member.enemyId must reference an existing enemy. A structurally invalid battle-event page refuses the write (nothing is saved) — pass force: true to override.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"force":{"description":"Write even if validation finds structural problems (wrong parameter count, unterminated command list). Off by default: such a write is refused and nothing is written. Advisory warnings never block regardless.","type":"boolean"},"members":{"description":"Placed enemies; each references an existing enemyId","items":{"properties":{"enemyId":{"description":"Enemy id from Enemies.json","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"hidden":{"default":false,"description":"Whether the enemy starts hidden","type":"boolean"},"x":{"description":"X screen position of the enemy in battle","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"y":{"description":"Y screen position of the enemy in battle","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["enemyId","x","y"],"type":"object"},"type":"array"},"name":{"description":"Troop name shown in the database","type":"string"},"pages":{"description":"Battle-event pages { conditions, list, span }; defaults to one blank page","items":{},"type":"array"},"verbose":{"description":"Echo the full written record instead of the default summary. Off by default: the response reports identity, counts and command-list shape, which is what you would assert on, and omits the parameters/conditions you would only re-read. Read the full record with the matching get_* tool.","type":"boolean"}},"required":["name"],"type":"object"},"name":"create_troop"},{"description":"Update a troop's properties (shallow merge). If `members` is provided, each enemyId is validated to exist. A structurally invalid battle-event page refuses the write (nothing is saved) — pass force: true to override.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"force":{"description":"Write even if validation finds structural problems (wrong parameter count, unterminated command list). Off by default: such a write is refused and nothing is written. Advisory warnings never block regardless.","type":"boolean"},"troopId":{"description":"The ID of the troop to update","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"updates":{"additionalProperties":{},"description":"Object containing troop properties to update (name, members, pages)","propertyNames":{"type":"string"},"type":"object"},"verbose":{"description":"Echo the full written record instead of the default summary. Off by default: the response reports identity, counts and command-list shape, which is what you would assert on, and omits the parameters/conditions you would only re-read. Read the full record with the matching get_* tool.","type":"boolean"}},"required":["troopId","updates"],"type":"object"},"name":"update_troop"},{"description":"Build a troop battle-event page { conditions, list, span } from a compact trigger — no hand-built 12-field conditions object. `when` keys (ANDed, at least one): turn [a, b] (turn a + b*X; b 0 = only turn a), enemyHpBelow [enemyIndex, pct] (0-based troop slot, NOT enemy id), actorHpBelow [actorId, pct], switch id, turnEnd true. `span`: battle (runs once per battle, default), turn (once per turn), moment (re-runs while the condition holds — guard it with a switch). Timing (turn-based battles): an enemy action pattern with conditionType 1 / [a, b] is chosen during turn N's input phase (troop turnCount N-1, +1) and a troop page turn [a, b] is checked once turn N's action phase starts (turnCount N), so matching [a, b] land on the same battle turn N — the page runs before anyone acts; add turnEnd: true to run it after that turn resolves instead (the classic telegraph: warn at the end of the wind-up turn, strike next turn). Turn 0 = battle start. With b > 0 use span \"turn\", or a \"battle\" page fires only once. `commands` come from the build_* tools (build_show_text, build_battle_command, …); the end marker is appended. Read-only: returns { page } — land it with add_troop_page (or create_troop/update_troop `pages`).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"commands":{"description":"The page's event commands (e.g. from build_* tools); default empty","items":{"properties":{"code":{"description":"Event command code","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"parameters":{"description":"Command parameters (default [])","items":{},"type":"array"}},"required":["code"],"type":"object"},"type":"array"},"span":{"description":"How often the page may run (default battle)","enum":["battle","turn","moment"],"type":"string"},"when":{"description":"Trigger; every key given is ANDed, at least one required","properties":{"actorHpBelow":{"additionalItems":false,"description":"[actorId, pct]: that actor at or below pct% HP","items":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"maximum":100,"minimum":0,"type":"integer"}],"maxItems":2,"minItems":2,"type":"array"},"enemyHpBelow":{"additionalItems":false,"description":"[enemyIndex, pct]: 0-based troop slot (NOT enemy id) at or below pct% HP","items":[{"maximum":7,"minimum":0,"type":"integer"},{"maximum":100,"minimum":0,"type":"integer"}],"maxItems":2,"minItems":2,"type":"array"},"switch":{"description":"Switch id that must be ON","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"turn":{"additionalItems":false,"description":"[a, b]: turn a + b*X (b 0 = only turn a). Match an enemy action-pattern Turn [a, b] to fire on the same turn","items":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"maximum":9007199254740991,"minimum":0,"type":"integer"}],"maxItems":2,"minItems":2,"type":"array"},"turnEnd":{"description":"true: run at the end of a turn","type":"boolean"}},"type":"object"}},"required":["when"],"type":"object"},"name":"build_troop_page"},{"description":"Append one battle-event page (e.g. the `page` from build_troop_page) to an existing troop without re-sending its other pages; `position` inserts it at that 0-based page index instead (the first page whose conditions hold runs, so order matters when triggers overlap). A structurally invalid page refuses the write (nothing is saved) — pass force: true to override; an HP condition on a troop slot past the troop's members, or a page with no condition enabled, is warned (never blocked). Returns { troop, pageIndex, warnings? }; fill it further with insert_event_commands target \"troop_page\".","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"force":{"description":"Write even if validation finds structural problems (wrong parameter count, unterminated command list). Off by default: such a write is refused and nothing is written. Advisory warnings never block regardless.","type":"boolean"},"page":{"description":"A troop battle-event page, e.g. the `page` from build_troop_page","properties":{"conditions":{"additionalProperties":{},"description":"The full editor conditions object","propertyNames":{"type":"string"},"type":"object"},"list":{"description":"Event commands, ending with the code-0 end marker","items":{"properties":{"code":{"description":"Event command code","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"parameters":{"description":"Command parameters (default [])","items":{},"type":"array"}},"required":["code"],"type":"object"},"type":"array"},"span":{"description":"0 battle / 1 turn / 2 moment","maximum":2,"minimum":0,"type":"integer"}},"required":["conditions","list","span"],"type":"object"},"position":{"description":"0-based page index to insert at (default: append)","maximum":9007199254740991,"minimum":0,"type":"integer"},"troopId":{"description":"The troop to add the page to","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"verbose":{"description":"Echo the full written record instead of the default summary. Off by default: the response reports identity, counts and command-list shape, which is what you would assert on, and omits the parameters/conditions you would only re-read. Read the full record with the matching get_* tool.","type":"boolean"}},"required":["troopId","page"],"type":"object"},"name":"add_troop_page"},{"description":"Search troops by name (case-insensitive)","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"searchTerm":{"description":"The search term to find troops","type":"string"}},"required":["searchTerm"],"type":"object"},"name":"search_troops"},{"description":"Create a new character class in data/Classes.json. Only `name` is required; omitted fields use the editor's new-class defaults (EXP curve [30,20,30,30], no traits/learnings, a linear param curve to maxLevel). Allocates and returns the next unused class id. NOTE: a class with no Hit Rate trait (xparam id 0: trait { code: 22, dataId: 0, value: 0.95 }) makes its actors always miss physical actions — pass one in `traits` for a combat-ready class. Likewise every learned skill's stypeId needs an Add Skill Type trait ({ code: 41, dataId: stypeId, value: 1 }) or the skill-type command never appears (warned, never blocked).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"expParams":{"description":"EXP curve: [basis, extra, accelerationA, accelerationB]","items":{"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"learnings":{"description":"Learned-skill entries { level, skillId, note }","items":{},"type":"array"},"maxLevel":{"description":"Highest level the param curve covers (default 99); sizes the params matrix","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"description":"Class name shown in the database","type":"string"},"note":{"description":"Note field","type":"string"},"params":{"description":"8 param growth curves, each maxLevel+1 long: [maxHP,maxMP,atk,def,mat,mdf,agi,luk]","items":{"items":{"type":"number"},"type":"array"},"type":"array"},"traits":{"description":"Trait objects { code, dataId, value }","items":{},"type":"array"}},"required":["name"],"type":"object"},"name":"create_class"},{"description":"Update a class's properties (shallow merge into the existing record). Use for name, expParams, traits, or to replace the whole learnings/params arrays; for targeted edits prefer add_class_learning / set_class_param_curve. Warns when a learned skill's stypeId has no Add Skill Type trait ({ code: 41 }).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"classId":{"description":"The ID of the class to update","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"updates":{"additionalProperties":{},"description":"Object containing class properties to update","propertyNames":{"type":"string"},"type":"object"}},"required":["classId","updates"],"type":"object"},"name":"update_class"},{"description":"Add a \"learn skill at level\" entry to a class (replaces the hack of attaching skills to an actor via an Add-Skill trait). Validates the skillId exists and keeps the learnings sorted by level. Warns (never blocks) when the skill's stypeId is not covered by an Add Skill Type trait ({ code: 41, dataId: stypeId, value: 1 }) on the class — without it the skill-type command never appears and actors cannot use the skill.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"classId":{"description":"The ID of the class to add the learning to","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"level":{"description":"Level at which the skill is learned","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"note":{"description":"Optional note for the learning entry","type":"string"},"skillId":{"description":"The skill learned (must exist in data/Skills.json)","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["classId","skillId","level"],"type":"object"},"name":"add_class_learning"},{"description":"Replace one of a class's 8 parameter growth curves. paramId is 0-7 ([maxHP,maxMP,atk,def,mat,mdf,agi,luk]); values must match the existing curve length (same max level).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"classId":{"description":"The ID of the class to edit","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"paramId":{"description":"Which param: 0 maxHP,1 maxMP,2 atk,3 def,4 mat,5 mdf,6 agi,7 luk","maximum":7,"minimum":0,"type":"integer"},"values":{"description":"New curve, indexed by level; must match the existing curve length","items":{"type":"number"},"type":"array"}},"required":["classId","paramId","values"],"type":"object"},"name":"set_class_param_curve"},{"description":"Create a new state (status condition like Poison/Sleep) in data/States.json. Only `name` is required; omitted fields use the editor's new-state defaults (no restriction, priority 50, no auto-removal, 1-turn duration). Allocates and returns the next unused state id.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"autoRemovalTiming":{"description":"Auto-removal timing: 0 none, 1 at action end, 2 at turn end","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"chanceByDamage":{"description":"Chance (%) of removal per damage instance when removeByDamage","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"iconIndex":{"description":"Icon shown on the battler/status (0 = none)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxTurns":{"description":"Maximum duration in turns when auto-removed","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"message1":{"description":"Message when an actor gains the state","type":"string"},"message2":{"description":"Message when an enemy gains the state","type":"string"},"message3":{"description":"Message when the state persists","type":"string"},"message4":{"description":"Message when the state is removed","type":"string"},"messageType":{"description":"Engine's message routing form","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"minTurns":{"description":"Minimum duration in turns when auto-removed","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"motion":{"description":"SV-actor motion (0 normal, 2 sleep, 3 dead, …)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"description":"State name shown in the database and battle messages","type":"string"},"note":{"description":"Note field","type":"string"},"overlay":{"description":"Overlay animation index (0 = none)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"priority":{"description":"Icon-slot display priority 0-100 (default 50)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"releaseByDamage":{"description":"Whether damage can release the state","type":"boolean"},"removeAtBattleEnd":{"description":"Remove automatically when the battle ends","type":"boolean"},"removeByDamage":{"description":"Remove when the battler takes damage","type":"boolean"},"removeByRestriction":{"description":"Remove when the battler's restriction changes","type":"boolean"},"removeByWalking":{"description":"Remove after walking a number of steps","type":"boolean"},"restriction":{"description":"Behavior restriction: 0 none, 1 attack enemy, 2 attack anyone, 3 attack ally, 4 cannot move","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"stepsToRemove":{"description":"Steps to walk off the state when removeByWalking","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"traits":{"description":"Trait objects { code, dataId, value }","items":{},"type":"array"}},"required":["name"],"type":"object"},"name":"create_state"},{"description":"Update a state's properties (shallow merge into the existing record)","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"stateId":{"description":"The ID of the state to update","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"updates":{"additionalProperties":{},"description":"Object containing state properties to update","propertyNames":{"type":"string"},"type":"object"}},"required":["stateId","updates"],"type":"object"},"name":"update_state"},{"description":"Create a new common event (reusable event-command list) in data/CommonEvents.json. Only `name` is required; omitted fields use the editor's new-slot defaults (empty command list, trigger 0 = call-only, switchId 1). Allocates and returns the next unused id. A structurally invalid command list refuses the write (nothing is saved) — pass force: true to override.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"force":{"description":"Write even if validation finds structural problems (wrong parameter count, unterminated command list). Off by default: such a write is refused and nothing is written. Advisory warnings never block regardless.","type":"boolean"},"list":{"description":"Event-command list { code, indent, parameters }; must end with code 0","items":{},"type":"array"},"name":{"description":"Common event name shown in the database","type":"string"},"switchId":{"description":"Switch that gates an Autorun/Parallel trigger (ignored when trigger is 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"trigger":{"description":"How it runs on its own: 0 None (call-only), 1 Autorun, 2 Parallel","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"verbose":{"description":"Echo the full written record instead of the default summary. Off by default: the response reports identity, counts and command-list shape, which is what you would assert on, and omits the parameters/conditions you would only re-read. Read the full record with the matching get_* tool.","type":"boolean"}},"required":["name"],"type":"object"},"name":"create_common_event"},{"description":"Update a common event's properties (shallow merge into the existing record). Use for name, trigger, switchId, or to replace the whole command list. A structurally invalid command list refuses the write (nothing is saved) — pass force: true to override.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"commonEventId":{"description":"The ID of the common event to update","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"force":{"description":"Write even if validation finds structural problems (wrong parameter count, unterminated command list). Off by default: such a write is refused and nothing is written. Advisory warnings never block regardless.","type":"boolean"},"updates":{"additionalProperties":{},"description":"Object containing common event properties to update (name, trigger, switchId, list)","propertyNames":{"type":"string"},"type":"object"},"verbose":{"description":"Echo the full written record instead of the default summary. Off by default: the response reports identity, counts and command-list shape, which is what you would assert on, and omits the parameters/conditions you would only re-read. Read the full record with the matching get_* tool.","type":"boolean"}},"required":["commonEventId","updates"],"type":"object"},"name":"update_common_event"},{"description":"Build a \"Common Event\" event command (code 117) that calls the given common event, for insertion into an event page via insert_event_commands. Validates the common event exists. Read-only: returns `{ command }` (matching the build_* tools, so it composes into a thenBranch/commands array); writes nothing.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"commonEventId":{"description":"The ID of the common event to call (must exist)","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"indent":{"description":"Indentation level in the target list (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["commonEventId"],"type":"object"},"name":"call_common_event"},{"description":"Build a movement route from a named pattern (patrol/approach/flee/wander/custom) instead of raw move-command codes. Read-only: returns { moveRoute, warnings? }. Use the route as an event page’s autonomous moveRoute (update_map_event with moveType 3), or feed it to set_movement_route for a forced route in an event command list.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"commands":{"description":"custom only: raw move commands { code, parameters }","items":{"properties":{"code":{"description":"Move-route command code (Game_Character ROUTE_*)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"parameters":{"description":"Command parameters (default [])","items":{},"type":"array"}},"required":["code"],"type":"object"},"type":"array"},"direction":{"description":"patrol only: primary direction, walked out and back (default right)","enum":["up","down","left","right"],"type":"string"},"pattern":{"description":"patrol (walk a direction and back), approach (toward player), flee (away from player), wander (random), or custom (your own move commands)","enum":["patrol","approach","flee","wander","custom"],"type":"string"},"repeat":{"description":"Loop the route (patterns loop by default)","type":"boolean"},"skippable":{"description":"Skip a step when movement is blocked","type":"boolean"},"steps":{"description":"patrol only: steps per leg (default 3)","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"wait":{"description":"Wait for the route to finish before continuing","type":"boolean"}},"required":["pattern"],"type":"object"},"name":"create_move_route"},{"description":"Insert a forced \"Set Movement Route\" (event command 205, plus the 505 continuation rows the editor expects) into an event page’s command list, moving a character as part of that page. characterId: -1 player, 0 this event, N event id. Pass a moveRoute from create_move_route. A structurally invalid route or page refuses the write (nothing is saved) — pass force: true to override.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"characterId":{"description":"Target character: -1 player, 0 this event, N event id on the map","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"eventId":{"description":"The ID of the event","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"force":{"description":"Write even if validation finds structural problems (wrong parameter count, unterminated command list). Off by default: such a write is refused and nothing is written. Advisory warnings never block regardless.","type":"boolean"},"indent":{"description":"Indentation level in the list (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"mapId":{"description":"The ID of the map","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"moveRoute":{"description":"The move route to force (e.g. from create_move_route)","properties":{"list":{"description":"Move commands; auto-terminated with code 0 if missing","items":{"properties":{"code":{"description":"Move-route command code (Game_Character ROUTE_*)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"parameters":{"description":"Command parameters (default [])","items":{},"type":"array"}},"required":["code"],"type":"object"},"type":"array"},"repeat":{"type":"boolean"},"skippable":{"type":"boolean"},"wait":{"type":"boolean"}},"required":["list"],"type":"object"},"pageIndex":{"description":"Zero-based page index","maximum":9007199254740991,"minimum":0,"type":"integer"},"position":{"description":"Insertion index; defaults to the end of the list","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["mapId","eventId","pageIndex","characterId","moveRoute"],"type":"object"},"name":"set_movement_route"},{"description":"Build a Show Text event-command sequence (101 setup + one 401 line per text line) for insertion via insert_event_commands. Supports face image (from list_assets(\"faces\")), window background/position, and the MZ name-box speaker. MZ does NOT word-wrap: keep each line under ~55 chars (~38 with a face) or it is cut off at the window edge (warned, never blocked) — or pass `wrap: true` to word-wrap automatically to that same width (escape codes like \\C[n] do not count) and split into as many 4-line message boxes as needed. Read-only: returns { commands, warnings? }, writes nothing.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"background":{"description":"Window background (default window)","enum":["window","dim","transparent"],"type":"string"},"faceIndex":{"description":"Face index 0–7 in the sheet (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"faceName":{"description":"Face image basename (\"\" = none, default)","type":"string"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"lines":{"description":"Message lines (one entry per visual line)","items":{"type":"string"},"type":"array"},"position":{"description":"Window position (default bottom)","enum":["top","middle","bottom"],"type":"string"},"speakerName":{"description":"MZ name-box speaker name (default \"\")","type":"string"},"wrap":{"anyOf":[{"type":"boolean"},{"enum":["soft","hard"],"type":"string"}],"description":"Auto word-wrap to the message-window width (the same width the line-length warning uses) and split into 4-line boxes. true/\"soft\" reflows all lines as one paragraph; \"hard\" keeps each entry (and \\n) as a forced line break. Default off (one line per entry, verbatim)."}},"required":["lines"],"type":"object"},"name":"build_show_text"},{"description":"Build a Show Choices block (102 opener + a 402 branch per choice + optional 403 When-Cancel branch + 404 closer, each branch terminated like the editor) for insertion via insert_event_commands. Pass per-choice `branches` (each an EventCommand[] — e.g. from build_show_text) to fill the branch bodies. Read-only: returns { commands }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"background":{"description":"Choice window background (default window)","enum":["window","dim","transparent"],"type":"string"},"branches":{"description":"Commands per choice (same order as choices); omitted/short = empty branches","items":{"items":{"properties":{"code":{"description":"Event command code","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"parameters":{"description":"Command parameters (default [])","items":{},"type":"array"}},"required":["code"],"type":"object"},"type":"array"},"type":"array"},"cancelBranch":{"description":"Commands for a \"When Cancel\" branch (adds a 403 block; cancel routes here)","items":{"properties":{"code":{"description":"Event command code","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"parameters":{"description":"Command parameters (default [])","items":{},"type":"array"}},"required":["code"],"type":"object"},"type":"array"},"cancelType":{"description":"Without a cancelBranch: 0-based choice index the Cancel button maps to, or -1 Disallow (default -1)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"choices":{"description":"The choice labels shown to the player","items":{"type":"string"},"type":"array"},"defaultType":{"description":"0-based default (highlighted) choice, or -1 none (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"indent":{"description":"Indentation level of the block (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"position":{"description":"Choice window position (default right)","enum":["left","middle","right"],"type":"string"}},"required":["choices"],"type":"object"},"name":"build_show_choices"},{"description":"Build a Conditional Branch block (111 condition + then-branch + optional 411 Else + 412 closer, each branch terminated like the editor) for insertion via insert_event_commands. Condition types: switch, self_switch, variable, actor_in_party, gold, item. Provide thenBranch/elseBranch as EventCommand[] (e.g. from other builders). Read-only: returns { commands }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"condition":{"description":"Conditional branch condition","properties":{"actorId":{"description":"actor_in_party: the actor id","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"compare":{"description":"gold: comparison operator","enum":[">=","<=","<"],"type":"string"},"comparison":{"description":"variable: comparison operator","enum":["==",">=","<=",">","<","!="],"type":"string"},"constant":{"description":"variable: compare against this constant (default 0)","type":"number"},"gold":{"description":"gold: the amount to compare against","type":"number"},"itemId":{"description":"item: the item id (tests \"party has item\")","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"description":"self_switch: which self switch","enum":["A","B","C","D"],"type":"string"},"switchId":{"description":"switch: the switch id to test","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"type":{"description":"Condition type","enum":["switch","self_switch","variable","actor_in_party","gold","item"],"type":"string"},"value":{"description":"switch/self_switch: test for on (default) or off","enum":["on","off"],"type":"string"},"variableId":{"description":"variable: the variable id (left side)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"variableOperand":{"description":"variable: compare against this variable id (overrides constant)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["type"],"type":"object"},"elseBranch":{"description":"Commands for the Else branch; presence (even empty) adds the 411 Else block","items":{"properties":{"code":{"description":"Event command code","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"parameters":{"description":"Command parameters (default [])","items":{},"type":"array"}},"required":["code"],"type":"object"},"type":"array"},"indent":{"description":"Indentation level of the block (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"thenBranch":{"description":"Commands to run when the condition is true (default empty)","items":{"properties":{"code":{"description":"Event command code","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"parameters":{"description":"Command parameters (default [])","items":{},"type":"array"}},"required":["code"],"type":"object"},"type":"array"}},"required":["condition"],"type":"object"},"name":"build_conditional_branch"},{"description":"Build a single flow-control event command for insertion via insert_event_commands: wait (230, N frames), exit_event (115), label (118, a named jump target), or jump_to_label (119). Read-only: returns { command }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"frames":{"description":"wait: number of frames (60 = 1 second)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"kind":{"description":"Which flow command to build","enum":["wait","exit_event","label","jump_to_label"],"type":"string"},"name":{"description":"label/jump_to_label: the label name","type":"string"}},"required":["kind"],"type":"object"},"name":"build_flow_command"},{"description":"Build a Control Switches (121) or Control Self Switch (123) event command for insertion via insert_event_commands. scope \"switch\": set a switch (or the inclusive switchId..endId range) on/off. scope \"self_switch\": set the current event's self switch A–D. Read-only: returns { command }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"endId":{"description":"switch: inclusive range end (default = switchId, a single switch)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"description":"self_switch: which self switch","enum":["A","B","C","D"],"type":"string"},"scope":{"description":"\"switch\" (global, by id/range) or \"self_switch\" (this event, A–D)","enum":["switch","self_switch"],"type":"string"},"switchId":{"description":"switch: the switch id (range start)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"value":{"description":"Set on (default) or off","enum":["on","off"],"type":"string"}},"required":["scope"],"type":"object"},"name":"build_control_switch"},{"description":"Build a Control Variables (122) event command for insertion via insert_event_commands. Applies operation (set/add/sub/mul/div/mod) to a variable (or the inclusive variableId..endId range) using an operand: constant, another variable, a random range, or game_data (item/actor/party/… readouts). Read-only: returns { command }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"endId":{"description":"Inclusive range end (default = variableId, a single variable)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"operand":{"description":"The right-hand operand of the Control Variables command","properties":{"dataType":{"description":"game_data: 0 item/1 weapon/2 armor count, 3 actor, 4 enemy, 5 char, 6 party, 7 other, 8 last","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"max":{"description":"random: inclusive maximum","type":"number"},"min":{"description":"random: inclusive minimum","type":"number"},"param1":{"description":"game_data: first sub-parameter (see corescript)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"param2":{"description":"game_data: second sub-parameter (see corescript)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"type":{"description":"Operand source for the variable value","enum":["constant","variable","random","game_data"],"type":"string"},"value":{"description":"constant: the value","type":"number"},"variableId":{"description":"variable: the source variable id","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["type"],"type":"object"},"operation":{"description":"Arithmetic applied to the target (default set)","enum":["set","add","sub","mul","div","mod"],"type":"string"},"variableId":{"description":"The target variable id (range start)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["variableId","operand"],"type":"object"},"name":"build_control_variable"},{"description":"Build a Change Gold (125) event command for insertion via insert_event_commands — increase or decrease party gold by a constant or variable amount. Read-only: returns { command }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"operand":{"description":"The amount to gain/lose (constant or variable)","properties":{"type":{"description":"constant amount or a variable value","enum":["constant","variable"],"type":"string"},"value":{"description":"constant: the amount","type":"number"},"variableId":{"description":"variable: the variable id to read","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["type"],"type":"object"},"operation":{"description":"Gain or lose gold","enum":["increase","decrease"],"type":"string"}},"required":["operation","operand"],"type":"object"},"name":"build_change_gold"},{"description":"Build a Change Items (126), Change Weapons (127), or Change Armors (128) event command for insertion via insert_event_commands — gain/lose an item/weapon/armor by a constant or variable amount. includeEquip (weapon/armor only) also counts equipped copies when removing. Read-only: returns { command }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"id":{"description":"The item/weapon/armor id","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"includeEquip":{"description":"weapon/armor: also count equipped copies (default false)","type":"boolean"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"kind":{"description":"Which inventory to change","enum":["item","weapon","armor"],"type":"string"},"operand":{"description":"The amount to gain/lose (constant or variable)","properties":{"type":{"description":"constant amount or a variable value","enum":["constant","variable"],"type":"string"},"value":{"description":"constant: the amount","type":"number"},"variableId":{"description":"variable: the variable id to read","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["type"],"type":"object"},"operation":{"description":"Gain or lose","enum":["increase","decrease"],"type":"string"}},"required":["kind","id","operation","operand"],"type":"object"},"name":"build_change_items"},{"description":"Build a Change Party Member (129) event command for insertion via insert_event_commands — add or remove an actor from the party. initialize (add only) resets the actor to their initial state. Read-only: returns { command }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"actorId":{"description":"The actor id","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"initialize":{"description":"add only: reset the actor to their initial state (default false)","type":"boolean"},"operation":{"description":"Add to or remove from the party","enum":["add","remove"],"type":"string"}},"required":["actorId","operation"],"type":"object"},"name":"build_change_party_member"},{"description":"Build a Transfer Player (201) event command for insertion via insert_event_commands — move the party to (x, y) on a map. With designation \"variable\", mapId/x/y are variable ids resolved at runtime. Read-only: returns { command }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"designation":{"description":"direct: mapId/x/y are literal; variable: they are variable ids (default direct)","enum":["direct","variable"],"type":"string"},"direction":{"description":"Facing after transfer (default retain)","enum":["retain","down","left","right","up"],"type":"string"},"fade":{"description":"Fade style (default black)","enum":["black","white","none"],"type":"string"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"mapId":{"description":"Destination map id (or a variable id if designation=variable)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"x":{"description":"Destination tile x (or a variable id)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"y":{"description":"Destination tile y (or a variable id)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["mapId","x","y"],"type":"object"},"name":"build_transfer_player"},{"description":"Build a Play BGM/BGS/ME/SE (241/245/249/250) event command for insertion via insert_event_commands. Warns (never blocks) when `name` is not a known audio asset for that channel (checked against list_assets). Returns { command, warnings? }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"kind":{"description":"Which audio channel to play on","enum":["bgm","bgs","me","se"],"type":"string"},"name":{"description":"Audio basename (from list_assets, extension stripped)","type":"string"},"pan":{"description":"Pan -100–100 (default 0)","type":"number"},"pitch":{"description":"Pitch 50–150 (default 100)","type":"number"},"volume":{"description":"Volume 0–100 (default 90)","type":"number"}},"required":["kind","name"],"type":"object"},"name":"build_play_audio"},{"description":"Build a screen transition/effect event command for insertion via insert_event_commands: fadeout (221) / fadein (222) — no params; tint (223) & flash (224) — an [r,g,b,a] color over `duration` frames; shake (225) — power/speed over `duration`. `wait` holds the event until it finishes. Read-only: returns { command }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"color":{"description":"tint: [red,green,blue,gray] (−255…255); flash: [red,green,blue,intensity] (0…255)","items":{"type":"number"},"maxItems":4,"minItems":4,"type":"array"},"duration":{"description":"tint/flash/shake: frames (default 60)","type":"number"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"kind":{"description":"Which screen effect to build","enum":["fadeout","fadein","tint","flash","shake"],"type":"string"},"power":{"description":"shake: strength 1–9 (default 5)","type":"number"},"speed":{"description":"shake: speed 1–9 (default 5)","type":"number"},"wait":{"description":"tint/flash/shake: hold the event until it finishes (default true)","type":"boolean"}},"required":["kind"],"type":"object"},"name":"build_screen_effect"},{"description":"Build a Show Picture (231) or Erase Picture (235) event command for insertion via insert_event_commands. show: display `name` in slot `pictureId` with origin/position/scale/opacity/blend; erase: clear the slot. Read-only: returns { command }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"blend":{"description":"show: blend mode (default normal)","enum":["normal","additive","multiply","screen"],"type":"string"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"kind":{"description":"Show a picture or erase a slot","enum":["show","erase"],"type":"string"},"name":{"description":"show: picture basename (from list_assets(\"pictures\"))","type":"string"},"opacity":{"description":"show: opacity 0–255 (default 255)","type":"number"},"origin":{"description":"show: anchor point (default upper_left)","enum":["upper_left","center"],"type":"string"},"pictureId":{"description":"Picture slot 1–100","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"scaleX":{"description":"show: horizontal scale % (default 100)","type":"number"},"scaleY":{"description":"show: vertical scale % (default 100)","type":"number"},"x":{"description":"show: screen x in pixels (default 0)","type":"number"},"y":{"description":"show: screen y in pixels (default 0)","type":"number"}},"required":["kind","pictureId"],"type":"object"},"name":"build_picture"},{"description":"Build a Show Animation (212) or Show Balloon Icon (213) event command for insertion via insert_event_commands, played over a character (characterId: -1 player, 0 this event, N event id). Read-only: returns { command }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"characterId":{"description":"Target character: -1 player, 0 this event, N event id on the current map","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"id":{"description":"animation: the animation id; balloon: the balloon id (1 exclamation, 2 question, …)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"kind":{"description":"Play an animation or a balloon icon","enum":["animation","balloon"],"type":"string"},"wait":{"description":"Hold the event until it finishes (default false)","type":"boolean"}},"required":["kind","characterId","id"],"type":"object"},"name":"build_character_effect"},{"description":"Build a Battle Processing (301) event command for insertion via insert_event_commands — start a battle against a troop (direct id, a variable holding the id, or \"random\" like the map encounters). canEscape/canLose gate the battle result branches. Read-only: returns { command }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"canEscape":{"description":"Allow the party to escape (default false)","type":"boolean"},"canLose":{"description":"Continue the event if the party loses (default false)","type":"boolean"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"troop":{"description":"How the troop is chosen (default direct)","enum":["direct","variable","random"],"type":"string"},"troopId":{"description":"direct: the troop id; variable: the variable id holding it","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"type":"object"},"name":"build_battle_processing"},{"description":"Build a Shop Processing (302 + one 605 row per extra good) event-command sequence for insertion via insert_event_commands. Each good sells an item/weapon/armor at its database price, or a specified `price`. purchaseOnly hides the sell tab. Read-only: returns { commands }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"goods":{"description":"The goods offered (at least one)","items":{"properties":{"id":{"description":"The item/weapon/armor id","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"kind":{"description":"What is for sale","enum":["item","weapon","armor"],"type":"string"},"price":{"description":"Override price (omitted = the database standard price)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["kind","id"],"type":"object"},"type":"array"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"purchaseOnly":{"description":"Hide the sell tab (default false)","type":"boolean"}},"required":["goods"],"type":"object"},"name":"build_shop_processing"},{"description":"Build a Name Input Processing (303) event command for insertion via insert_event_commands — open the name-entry screen for an actor. Read-only: returns { command }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"actorId":{"description":"The actor whose name is entered","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxLength":{"description":"Max name length (default 8)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["actorId"],"type":"object"},"name":"build_name_input"},{"description":"Build an actor stat-change scene command for insertion via insert_event_commands: hp (311), mp (312), state (313), recover_all (314), exp (315), or level (316). Targets a fixed actor (0 = whole party) or a variable. hp/mp/exp/level take an increase/decrease `operand` (constant or variable); state takes add/remove + `stateId`; recover_all takes nothing extra. Read-only: returns { command }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"allowKnockout":{"description":"hp: allow the change to reduce HP to 0/death (default false)","type":"boolean"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"kind":{"description":"Which actor change to build","enum":["hp","mp","state","recover_all","exp","level"],"type":"string"},"operand":{"description":"hp/mp/exp/level: the amount (constant/variable)","properties":{"type":{"description":"constant amount or a variable value","enum":["constant","variable"],"type":"string"},"value":{"description":"constant: the amount","type":"number"},"variableId":{"description":"variable: the variable id to read","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["type"],"type":"object"},"operation":{"description":"hp/mp/exp/level: gain or lose (default increase)","enum":["increase","decrease"],"type":"string"},"showLevelUp":{"description":"exp/level: show the level-up message (default false)","type":"boolean"},"stateId":{"description":"state: the state id","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"stateOperation":{"description":"state: add or remove the state","enum":["add","remove"],"type":"string"},"target":{"description":"Which actor(s) the change applies to","properties":{"actorId":{"description":"fixed: the actor id (0 = entire party)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"type":{"description":"fixed actor id (0 = whole party) or a variable","enum":["fixed","variable"],"type":"string"},"variableId":{"description":"variable: the variable id holding the actor id","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["type"],"type":"object"}},"required":["kind","target"],"type":"object"},"name":"build_change_actor"},{"description":"Build an in-battle event command for a troop battle-event page (see build_troop_page / add_troop_page / insert_event_commands target \"troop_page\"): enemy_appear (335 — reveal a troop member added with hidden: true, i.e. a summon/reinforcement), enemy_state (333 — add/remove a state on one troop member or the whole troop, e.g. a telegraph \"Gathering power\" state), or abort_battle (340 — end the battle with no victory/defeat; the calling Battle Processing takes its Escape branch). `enemyIndex` is the 0-based troop slot (members[] order), NOT an enemy id; enemy_state also accepts -1 = entire troop. Read-only: returns { command }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"enemyIndex":{"description":"enemy_appear/enemy_state: 0-based troop slot (members[] order); enemy_state also allows -1 = entire troop","maximum":9007199254740991,"minimum":-1,"type":"integer"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"kind":{"description":"Which battle command to build","enum":["enemy_appear","enemy_state","abort_battle"],"type":"string"},"stateId":{"description":"enemy_state: the state id","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"stateOperation":{"description":"enemy_state: add or remove the state (default add)","enum":["add","remove"],"type":"string"}},"required":["kind"],"type":"object"},"name":"build_battle_command"},{"description":"Insert a pre-built sequence of event commands (from the build_* builders) into any of the three command lists an MZ project has — the mutating companion to the read-only builders. Splices before the list’s end marker (or at `position`). target \"map_event\" (the default) needs mapId + eventId + pageIndex; \"common_event\" needs commonEventId; \"troop_page\" needs troopId + pageIndex. The resulting list is validated before writing: a structural problem (wrong parameter count for a command code, a list left unterminated) refuses the write and saves nothing — pass force: true to override. Advisory findings (unrecognized code, over-long text line) are returned as `warnings` and never block. Returns { target, id, listLength, listCodes, warnings? } — the resulting list as its length and its command CODES, which is what you verify a splice against; pass verbose: true for the full list with parameters, or read it back with get_map_event.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"commands":{"description":"The event commands to insert (e.g. the `commands` from a build_* tool)","items":{"properties":{"code":{"description":"Event command code","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"parameters":{"description":"Command parameters (default [])","items":{},"type":"array"}},"required":["code"],"type":"object"},"type":"array"},"commonEventId":{"description":"target \"common_event\": the common event id","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"eventId":{"description":"target \"map_event\": the event id","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"force":{"description":"Write even if validation finds structural problems (wrong parameter count, unterminated command list). Off by default: such a write is refused and nothing is written. Advisory warnings never block regardless.","type":"boolean"},"mapId":{"description":"target \"map_event\": the map id","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"pageIndex":{"description":"target \"map_event\"/\"troop_page\": zero-based page index","maximum":9007199254740991,"minimum":0,"type":"integer"},"position":{"description":"Insertion index; defaults to the end of the list","maximum":9007199254740991,"minimum":0,"type":"integer"},"target":{"description":"Which command list to insert into (default map_event)","enum":["map_event","common_event","troop_page"],"type":"string"},"troopId":{"description":"target \"troop_page\": the troop id","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"verbose":{"description":"Echo the full written record instead of the default summary. Off by default: the response reports identity, counts and command-list shape, which is what you would assert on, and omits the parameters/conditions you would only re-read. Read the full record with the matching get_* tool.","type":"boolean"}},"required":["commands"],"type":"object"},"name":"insert_event_commands"},{"description":"Update an existing event page's graphic and behavior in one call, without rebuilding the whole page or touching its command list: sprite (characterName/characterIndex/direction/pattern or a tileId), trigger, priority, movement (type/speed/frequency/route), and the through/walkAnime/stepAnime/directionFix flags. Graphic fields merge onto the current image; warns (never blocks) on an unknown characterName. Refuses the write if the change would leave the event unreachable (an action-button page with priority `below` on an impassable tile) — pass force: true to override.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"characterIndex":{"description":"Sprite index 0–7 in the sheet","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"characterName":{"description":"Sprite sheet basename (from list_assets(\"characters\")); \"\" = no sprite","type":"string"},"direction":{"description":"Facing direction of the sprite","enum":["down","left","right","up"],"type":"string"},"directionFix":{"description":"Lock the facing direction","type":"boolean"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"eventId":{"description":"The ID of the event","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"force":{"description":"Write even if validation finds structural problems (wrong parameter count, unterminated command list). Off by default: such a write is refused and nothing is written. Advisory warnings never block regardless.","type":"boolean"},"indent":{"description":"(unused; page-level tool)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"mapId":{"description":"The ID of the map","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"moveFrequency":{"description":"Movement frequency 1–5 (3 = normal)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"moveRoute":{"additionalProperties":{},"description":"Autonomous move route (from create_move_route); pairs with moveType \"custom\"","propertyNames":{"type":"string"},"type":"object"},"moveSpeed":{"description":"Movement speed 1–6 (4 = normal)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"moveType":{"description":"Autonomous movement (custom uses moveRoute)","enum":["fixed","random","approach","custom"],"type":"string"},"pageIndex":{"description":"Zero-based page index","maximum":9007199254740991,"minimum":0,"type":"integer"},"pattern":{"description":"Sprite animation frame 0–2 (1 = idle)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"priority":{"description":"Stacking vs. the player: below/same/above characters (same = solid)","enum":["below","same","above"],"type":"string"},"stepAnime":{"description":"Animate in place while stopped","type":"boolean"},"through":{"description":"Let the player/others pass through the event","type":"boolean"},"tileId":{"description":"Use a tile as the graphic instead of a sprite (0 = none)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"trigger":{"description":"What starts the page","enum":["action_button","player_touch","event_touch","autorun","parallel"],"type":"string"},"verbose":{"description":"Echo the full written record instead of the default summary. Off by default: the response reports identity, counts and command-list shape, which is what you would assert on, and omits the parameters/conditions you would only re-read. Read the full record with the matching get_* tool.","type":"boolean"},"walkAnime":{"description":"Animate the walk cycle while moving","type":"boolean"}},"required":["mapId","eventId","pageIndex"],"type":"object"},"name":"set_event_page"},{"description":"Create a complete, placed NPC event on a map in one call — a graphic + trigger + a talk list. Provide `text` (built into a Show Text sequence, with optional face/speaker; `wrap: true` word-wraps paragraphs into 4-line message boxes) or an explicit `commands` array (commands wins if both given). Defaults to a solid, action-button NPC facing down. Warns (never blocks) on an unknown characterName, and on NO graphic at all (an NPC with no characterName is invisible in-game — use create_map_event for an intentionally-invisible trigger). The one-shot \"make a talking NPC that says X\" primitive.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"characterIndex":{"description":"Sprite index 0–7 in the sheet","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"characterName":{"description":"Sprite sheet basename (from list_assets(\"characters\"))","type":"string"},"commands":{"description":"Explicit command list (from the build_* tools); overrides `text` if given","items":{"properties":{"code":{"description":"Event command code","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"indent":{"description":"Indentation level (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"parameters":{"description":"Command parameters (default [])","items":{},"type":"array"}},"required":["code"],"type":"object"},"type":"array"},"direction":{"description":"Facing direction (default down)","enum":["down","left","right","up"],"type":"string"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"faceIndex":{"description":"text: face index 0–7","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"faceName":{"description":"text: face image basename (from list_assets(\"faces\"))","type":"string"},"force":{"description":"Write even if validation finds structural problems (wrong parameter count, unterminated command list). Off by default: such a write is refused and nothing is written. Advisory warnings never block regardless.","type":"boolean"},"mapId":{"description":"The ID of the map to place the NPC on","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"name":{"description":"Event name (editor label)","type":"string"},"pattern":{"description":"Sprite frame 0–2 (default 1 = idle when a sprite is set)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"priority":{"description":"Stacking vs. the player (default same = solid)","enum":["below","same","above"],"type":"string"},"speakerName":{"description":"text: MZ name-box speaker name","type":"string"},"text":{"description":"Dialogue lines shown when the NPC is triggered (built as Show Text)","items":{"type":"string"},"type":"array"},"through":{"description":"Let the player pass through (default false)","type":"boolean"},"trigger":{"description":"What starts the event (default action_button)","enum":["action_button","player_touch","event_touch","autorun","parallel"],"type":"string"},"wrap":{"anyOf":[{"type":"boolean"},{"enum":["soft","hard"],"type":"string"}],"description":"Auto word-wrap to the message-window width (the same width the line-length warning uses) and split into 4-line boxes. true/\"soft\" reflows all lines as one paragraph; \"hard\" keeps each entry (and \\n) as a forced line break. Default off (one line per entry, verbatim)."},"x":{"description":"X tile position","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"y":{"description":"Y tile position","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["mapId","x","y","name"],"type":"object"},"name":"create_npc"},{"description":"Create a complete, placed treasure chest on a map in one call — the two-page self-switch idiom done correctly, so the chest can never be looted twice. Page 1 (closed) is an action-button, priority-`same` event that optionally shows `text`, gives the contents, then flips its self switch; page 2 (opened) is gated on that self switch, shows the opened graphic and does nothing. `kind` picks the payout: item/weapon/armor (needs `id`) or gold. On the RTP `!Chest` sheet the open/closed states are the *direction* rows of one character block (down = closed, up = open), which is what closedDirection/openedDirection default to. Throws if the item/weapon/armor `id` does not exist; warns (never blocks) on an unknown characterName or a chest with no graphic.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"amount":{"description":"How many (or how much gold) to give; default 1","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"characterIndex":{"description":"Which chest in the sheet (0-7); default 0","maximum":9007199254740991,"minimum":0,"type":"integer"},"characterName":{"description":"Chest sprite basename from list_assets(\"characters\"), e.g. \"!Chest\"","type":"string"},"closedDirection":{"description":"Direction row showing the CLOSED chest; default \"down\"","enum":["down","left","right","up"],"type":"string"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"force":{"description":"Write even if validation finds structural problems (wrong parameter count, unterminated command list). Off by default: such a write is refused and nothing is written. Advisory warnings never block regardless.","type":"boolean"},"id":{"description":"The item/weapon/armor ID to give (omit for kind \"gold\")","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"kind":{"description":"What the chest gives; item/weapon/armor require `id`","enum":["item","weapon","armor","gold"],"type":"string"},"mapId":{"description":"The ID of the map to place the chest on","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"name":{"description":"Event name (editor label); default \"Chest\"","type":"string"},"openedDirection":{"description":"Direction row showing the OPENED chest; default \"up\"","enum":["down","left","right","up"],"type":"string"},"selfSwitch":{"description":"Self switch channel marking the chest looted; default \"A\"","enum":["A","B","C","D"],"type":"string"},"text":{"description":"Optional message shown on opening, e.g. [\"Found a Potion!\"]","items":{"type":"string"},"type":"array"},"x":{"description":"X tile position","maximum":9007199254740991,"minimum":0,"type":"integer"},"y":{"description":"Y tile position","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["mapId","x","y","kind"],"type":"object"},"name":"create_chest"},{"description":"Create a complete, placed map-transfer event in one call, using whichever of the two working idioms you pick. `idiom: \"action_button\"` (default) makes a priority-`same` event the player faces and presses — the right shape for a solid landmark (building, dungeon mouth, door); `idiom: \"player_touch\"` makes an invisible priority-`below` doormat the player walks onto — for interior exits and map-edge gaps. `direction` is the facing the player lands with, `fade` the screen transition. Throws if the destination map does not exist; warns if the destination tile is outside that map, if the characterName is unknown, or if the event can never fire from where it sits.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"characterIndex":{"description":"Sprite index 0-7 in the sheet","maximum":9007199254740991,"minimum":0,"type":"integer"},"characterName":{"description":"Optional sprite basename (a doormat is normally left invisible)","type":"string"},"direction":{"description":"Facing after the transfer; default \"retain\"","enum":["retain","down","left","right","up"],"type":"string"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"fade":{"description":"Screen fade during the transfer; default \"black\"","enum":["black","white","none"],"type":"string"},"force":{"description":"Write even if validation finds structural problems (wrong parameter count, unterminated command list). Off by default: such a write is refused and nothing is written. Advisory warnings never block regardless.","type":"boolean"},"idiom":{"description":"action_button = face a solid landmark and press (priority same, default); player_touch = walk onto a doormat (priority below)","enum":["action_button","player_touch"],"type":"string"},"mapId":{"description":"The ID of the map the trigger is placed on","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"name":{"description":"Event name (editor label); default \"Transfer\"","type":"string"},"targetMapId":{"description":"The ID of the destination map","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"targetX":{"description":"X tile the player lands on","maximum":9007199254740991,"minimum":0,"type":"integer"},"targetY":{"description":"Y tile the player lands on","maximum":9007199254740991,"minimum":0,"type":"integer"},"x":{"description":"X tile position of the trigger","maximum":9007199254740991,"minimum":0,"type":"integer"},"y":{"description":"Y tile position of the trigger","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["mapId","x","y","targetMapId","targetX","targetY"],"type":"object"},"name":"create_transfer"},{"description":"List every plugin command create_plugin_command can validate (plugin filename → command key → args): the plugins this project actually ships, scanned from their js/plugins/*.js annotations, merged over a small built-in allowlist. Pass pluginName to narrow to one plugin. Read-only. Use scan_plugins for the richer per-project view (arg types/defaults, enabled state); an unlisted plugin command can still be built, it just isn’t validated.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"pluginName":{"description":"Optional: restrict to one plugin (its filename without .js)","type":"string"}},"type":"object"},"name":"list_plugin_commands"},{"description":"Build an RPG Maker MZ plugin command (event command code 357) for insertion into an event page via add_event_command. Validates against the plugins this project actually ships (scanned from their js/plugins/*.js @command/@arg annotations) merged over a small built-in allowlist — warn-by-default: an unknown plugin/command, a stray arg, or a plugin that is installed but disabled in js/plugins.js produces a warning but never blocks. Args are normalized to the editor’s string-valued shape. Read-only: returns { command, warnings? }, writes nothing.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"args":{"additionalProperties":{},"description":"Command arguments as { name: value }; values are stored as strings on disk","propertyNames":{"type":"string"},"type":"object"},"commandName":{"description":"The command key the plugin registered (event command parameters[1])","type":"string"},"indent":{"description":"Indentation level in the target list (default 0)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"label":{"description":"Editor display label (parameters[2]); defaults to the command key","type":"string"},"pluginName":{"description":"Plugin filename without .js (event command parameters[0])","type":"string"}},"required":["pluginName","commandName"],"type":"object"},"name":"create_plugin_command"},{"description":"Decode a raw RPG Maker MZ tile id into its tileset sheet (A1–A5, B–E), and for autotiles its kind + shape slot (0–47) and autotile geometry (floor/wall/waterfall). Read-only inspection helper — raw tile ids are opaque integers, this makes one legible. Returns { tileId, empty, sheet, sheetIndex, autotile, kind?, shape?, autotileType? }. Pass `tilesetId` to also inspect the sheet PNG and report `transparent` (true = the tile is see-through and needs an opaque base tile on a lower layer; painting it on layer 0 alone shows the map void) + `transparentPercent`.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"tileId":{"description":"The raw tile id to decode","maximum":9007199254740991,"minimum":0,"type":"integer"},"tilesetId":{"description":"Tileset id — when given, also report the tile transparency (needs-a-base) flag","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["tileId"],"type":"object"},"name":"describe_tile"},{"description":"Get the semantic tile catalog for a tileset: the named tiles (e.g. 'Grassland A', 'Forest', 'Sea') in each of its image sheets, each with its representative tile id and a `source` ('builtin' = RPG Maker's own labels; 'sidecar' = authoritative names from an img/tilesets/<Sheet>.txt file shipped next to a non-default sheet, as DLC packs do; 'project' = a data/tilecatalog/ entry — a vision-bootstrap draft, or a human-verified `manual` one, which outranks a sidecar name). Project (custom-sheet) entries also carry the skill's `description`, `confidence` ('high'/'medium'/'low'), and `manual` (true = a human verified it) so you can gauge how trustworthy a draft name is. Autotile entries (A1–A4) return the kind's base tile id — feed it to a paint command, which recomputes the shape from neighbours. Covers the default RPG Maker tilesets, any non-default sheet with a .txt name sidecar in img/tilesets/ (loaded automatically), plus custom sheets cataloged into data/tilecatalog/ (via the tileset-catalog skill); still-uncovered sheets are omitted. **Called WITHOUT `sheet` it returns only a per-sheet index (name + entry count) to stay within the tool-output limit — a full tileset can hold thousands of named tiles. Pass `sheet` (filename 'World_A2' or slot role 'A2') to list one sheet's actual tile entries.** Sheet-filtered entries also carry `transparent` (true = the tile is see-through and needs an opaque base tile on a lower layer — painting it on layer 0 alone shows the map void; e.g. trees/objects/overlays). Read-only.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"sheet":{"description":"Restrict to one sheet by filename ('World_A2') or role ('A2'). Omit to get a per-sheet summary (counts only) instead of every entry.","type":"string"},"tilesetId":{"description":"Tileset id (from Tilesets.json / the map)","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["tilesetId"],"type":"object"},"name":"get_tile_catalog"},{"description":"Find tiles in a tileset by a case-insensitive SUBSTRING match on their catalog name — a quick bridge from a name fragment like 'grass' or 'forest' to a paintable tile id. This is a literal substring match, NOT synonym/semantic search: 'water' matches 'Endless Waterfall' but not 'Sea' or 'Pond' (their names lack the substring). To browse the actual tile names first, use get_tile_catalog with a `sheet` filter, then search a fragment you see. Set `searchDescriptions: true` to also match the free-text description a project catalog carries (custom sheets named by the tileset-catalog skill — their names are terse, the descriptions say what the tile looks like); built-in RPG Maker entries have no description, so this only widens the search over custom sheets. Returns matching catalog entries (name, sheet, tile id, autotile kind, `source`, `matchedIn` [which fields matched], `transparent` [true = needs an opaque base on a lower layer], plus `description`/`confidence`/`manual` for project catalog drafts). Covers the default RPG Maker tilesets, non-default sheets with a .txt name sidecar in img/tilesets/ (DLC packs ship these; loaded automatically, `source: 'sidecar'`), plus custom sheets cataloged into data/tilecatalog/ (via the tileset-catalog skill). Read-only.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"query":{"description":"Substring to match, e.g. 'grass' or 'forest' (literal substring, no synonyms)","type":"string"},"searchDescriptions":{"description":"Also match project-catalog tile descriptions, not just names (default false — names only)","type":"boolean"},"tilesetId":{"description":"Tileset id (from Tilesets.json / the map)","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["tilesetId","query"],"type":"object"},"name":"find_tile"},{"description":"Paint specific tiles onto a map, with automatic autotiling. Each cell is set to its tile id; if that id is an autotile (A1-A4, e.g. a catalog 'kind' base from find_tile), its shape and its neighbours' shapes are recomputed from same-kind adjacency so borders/corners line up. Flat tiles are painted as-is. Defaults to the lower ground layer (0). Higher-level than set_map_tile, which is a single raw tile with no autotiling.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"layer":{"description":"Z-layer 0-5 (default 0 = lower ground; 0-3 tiles, 4 shadow, 5 region id)","maximum":5,"minimum":0,"type":"integer"},"mapId":{"description":"The ID of the map","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"tiles":{"description":"Cells to paint","items":{"properties":{"tileId":{"description":"Tile id to paint (autotile base id from find_tile, or a raw id)","maximum":9007199254740991,"minimum":0,"type":"integer"},"x":{"description":"X tile position","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"y":{"description":"Y tile position","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["x","y","tileId"],"type":"object"},"minItems":1,"type":"array"}},"required":["mapId","tiles"],"type":"object"},"name":"paint_tiles"},{"description":"Fill a rectangular area of a map with one tile id, with automatic autotiling — a filled autotile region borders itself correctly (and re-borders any same-kind tiles it touches). Flat tiles fill uniformly. Defaults to the lower ground layer (0). For region ids, fill layer 5 with the region number as tileId.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"height":{"description":"Rectangle height in tiles","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"layer":{"description":"Z-layer 0-5 (default 0 = lower ground; 5 = region id)","maximum":5,"minimum":0,"type":"integer"},"mapId":{"description":"The ID of the map","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"tileId":{"description":"Tile id to fill with (autotile base or raw)","maximum":9007199254740991,"minimum":0,"type":"integer"},"width":{"description":"Rectangle width in tiles","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"x":{"description":"Left tile position of the rectangle","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"y":{"description":"Top tile position of the rectangle","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["mapId","x","y","width","height","tileId"],"type":"object"},"name":"fill_area"},{"description":"Paint a whole map area from an ASCII blueprint in ONE call and one write. `rows` are equal-length strings (one glyph per cell); `legend` maps each glyph to what that cell holds: `[[layer, tile], ...]` pairs (multi-layer cells, e.g. ground on 0 + fence on 1); a bare string = a catalog tile name on layer 0; `{ wall: { top, side?, faceHeight?, layer? }, tiles?: [...] }` = an A4 wall (or A3 roof) — every cell gets the wall-top kind and the bottom `faceHeight` (default 1) cell(s) of each vertical run get the wall-side kind (derived as top + 8 kinds = +384 ids unless `side` is given; a run continuing off the map's bottom edge gets no face); or `null` = leave the cell untouched. Tiles may be ids or catalog names (exact name, else a unique substring — unknown/ambiguous names are an error). Row lengths, unknown glyphs, names and fit are all validated before anything is written. With `clearUpperLayers` (default true) each painted cell zeroes the tile layers (0-3) above its lowest specified layer that it does not specify, so stale objects vanish (`[]` erases the cell). Autotiling is recomputed once per layer, as in paint_tiles. Returns cells painted per layer, cleared count, wall faces made, and a passability overview of the rectangle, judged like the engine's canPass (a step needs the source to allow leaving and the target to allow entry): `rows` with `#` = impassable — a cell with no walkable direction (face, water, solid object) or part of a region whose own edge flags refuse entry from the walkable cells around it (an A4 wall-top mass, a stair-less plateau) — and `.` = walkable ground, plus the impassable [x, y] cells. Stamp multi-tile B/C objects afterwards with place_object.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"clearUpperLayers":{"description":"Zero the tile layers above each cell's lowest specified layer that it does not specify (default true)","type":"boolean"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"legend":{"additionalProperties":{"anyOf":[{"type":"null"},{"minLength":1,"type":"string"},{"items":{"additionalItems":false,"description":"[layer, tile] — layer 0-5 (0-1 lower, 2-3 upper, 4 shadow, 5 region)","items":[{"maximum":5,"minimum":0,"type":"integer"},{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"minLength":1,"type":"string"}],"description":"A tile id, or a catalog tile name (exact name, else a unique substring — see find_tile)"}],"maxItems":2,"minItems":2,"type":"array"},"type":"array"},{"additionalProperties":false,"properties":{"tiles":{"description":"Extra [layer, tile] pairs","items":{"additionalItems":false,"description":"[layer, tile] — layer 0-5 (0-1 lower, 2-3 upper, 4 shadow, 5 region)","items":[{"maximum":5,"minimum":0,"type":"integer"},{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"minLength":1,"type":"string"}],"description":"A tile id, or a catalog tile name (exact name, else a unique substring — see find_tile)"}],"maxItems":2,"minItems":2,"type":"array"},"type":"array"},"wall":{"additionalProperties":false,"properties":{"faceHeight":{"description":"Face cells at the bottom of each vertical run (default 1)","maximum":9007199254740991,"minimum":1,"type":"integer"},"layer":{"description":"Tile layer for the wall (default 0)","maximum":3,"minimum":0,"type":"integer"},"side":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"minLength":1,"type":"string"}],"description":"Wall-side (face) tile; default = top + 8 kinds (+384 ids)"},"top":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"minLength":1,"type":"string"}],"description":"Wall-top tile: an A4 wall-top or A3 roof autotile"}},"required":["top"],"type":"object"}},"type":"object"}]},"description":"Glyph → cell contents (see the tool description for the value forms)","propertyNames":{"type":"string"},"type":"object"},"mapId":{"description":"The ID of the map","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"origin":{"additionalItems":false,"description":"[x, y] map position of the blueprint's top-left cell (default [0, 0])","items":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}],"maxItems":2,"minItems":2,"type":"array"},"rows":{"description":"Blueprint rows, top to bottom; every row the same length, one glyph per cell","items":{"type":"string"},"minItems":1,"type":"array"}},"required":["mapId","rows","legend"],"type":"object"},"name":"paint_blueprint"},{"description":"Expand a top-left flat tile id + a width×height size into the grid of tile ids that object occupies on the sheet — feed the returned `tiles` straight into place_object. This handles the flat sheets' two-half-column layout, where the tile below id N is NOT N+16 (indices 0–127 are the left half of the sheet, 128–255 the right), which is otherwise painful to compute by hand. Get the top-left id from find_tile/get_tile_catalog. Read-only. Throws if topLeftId isn't a flat id or the rectangle runs off the 16×16 sheet; warns if the tileset lacks that sheet.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"height":{"description":"Object height in tiles","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"tilesetId":{"description":"The tileset id the object belongs to","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"topLeftId":{"description":"Raw flat tile id of the object's top-left cell (from find_tile/get_tile_catalog)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"width":{"description":"Object width in tiles","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["tilesetId","topLeftId","width","height"],"type":"object"},"name":"object_tiles"},{"description":"Place a multi-tile B/C object (a house, tree, fountain, …) on a map and report its passability. `tiles` is the object's block of flat tile ids as rows (top to bottom), each row left to right; a 0 leaves that cell untouched so L-shaped/irregular objects work. Stamped onto the upper tile layer (2) by default so it draws over the ground. Unlike paint_tiles this does NOT autotile (objects are flat sheet tiles) — instead it uses the tileset flags to warn when a footprint cell sits on impassable terrain or overwrites an existing tile, and returns the resulting per-cell passability plus the `collision` cells the object turns into a solid obstacle. Warn-by-default: never refuses a placement. Get tile ids from find_tile/get_tile_catalog.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"layer":{"description":"Z-layer 0-3 to stamp onto (default 2 = upper tile layer, drawn over the ground)","maximum":3,"minimum":0,"type":"integer"},"mapId":{"description":"The ID of the map","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"tiles":{"description":"The object as a rectangular grid of tile ids: rows top→bottom, each row left→right. 0 = a transparent cell (left untouched).","items":{"items":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"minItems":1,"type":"array"},"minItems":1,"type":"array"},"x":{"description":"Left (top-left) tile x of where the object is placed","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"y":{"description":"Top (top-left) tile y of where the object is placed","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["mapId","x","y","tiles"],"type":"object"},"name":"place_object"},{"description":"List every tileset in the project with its id, name, mode (0 world / 1 area), and the image sheets it uses (labelled A1–A4, A5, B–E; empty slots omitted). Use this to discover valid tilesetId values (needed by find_tile, get_tile_catalog, paint_tiles, fill_area, place_object, get_tile_flags, set_tile_flags, check_passability) and to see which sheets each tileset is built from. For a plain id→name list, list_names(type:\"tilesets\") is even cheaper. Read-only.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"get_tilesets"},{"description":"Decode a tileset's flag word for a single tile id into a legible view: 4-direction passability (down/left/right/up — true = walkable that way), the [*] 'star' overlay bit, ladder/bush/counter/damage-floor flags, and terrain tag (0–7). Read-only inspection of data/Tilesets.json flags[]. Note passability here is for the tile in isolation; a real cell's passability layers its stacked tiles — use check_passability for that. Returns { tilesetId, tileId, tile, flags }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"tileId":{"description":"The raw tile id whose flags to decode","maximum":9007199254740991,"minimum":0,"type":"integer"},"tilesetId":{"description":"Tileset id (from Tilesets.json / the map)","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["tilesetId","tileId"],"type":"object"},"name":"get_tile_flags"},{"description":"Check whether a map cell can be walked onto, reproducing the engine's layered passage rule: the stacked tiles at (x, y) are examined upper-layer first, and the first non-[*] tile decides each direction. Reads the map's tileset flags. Returns per-direction passability (down/left/right/up — true = a character can walk off the cell that way), the cell's terrain tag, the stacked tile ids, and — when `direction` is given — a single `passable` boolean for that direction. Read-only.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"direction":{"description":"Optional: also report a single passable boolean for this direction","enum":["down","left","right","up"],"type":"string"},"mapId":{"description":"The map id to inspect","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"x":{"description":"Tile x coordinate","maximum":9007199254740991,"minimum":0,"type":"integer"},"y":{"description":"Tile y coordinate","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["mapId","x","y"],"type":"object"},"name":"check_passability"},{"description":"Edit a tile's passability/terrain/behaviour flags in a tileset's flags[] array (the write side of get_tile_flags). Only the fields you pass change — everything else on the tile is preserved (a non-destructive merge onto the current flag word). `passage` is walkability (down/left/right/up, true = a character can walk off that way). Also settable: star ([*] overlay), ladder, bush, counter, damage (damage floor), and terrainTag (0–7). For an autotile id (A1–A4) the change is applied to all 48 shape slots of its kind by default (set applyToAutotileKind:false to touch only the exact id) so painting any border shape keeps the same passability. Writes data/Tilesets.json through the commit choke point (dry-run/diff). Returns { tilesetId, tileId, appliedTileCount, before, after }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"applyToAutotileKind":{"description":"When the tile is an autotile (A1–A4), apply the change to all 48 shape slots of its kind (default true). Ignored for flat tiles.","type":"boolean"},"bush":{"type":"boolean"},"counter":{"type":"boolean"},"damage":{"description":"Damage floor (standing on it hurts).","type":"boolean"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"ladder":{"type":"boolean"},"passage":{"description":"Walkability per direction (true = walkable). Only the given directions change.","properties":{"down":{"type":"boolean"},"left":{"type":"boolean"},"right":{"type":"boolean"},"up":{"type":"boolean"}},"type":"object"},"star":{"description":"[*] overlay: tile drawn above the character.","type":"boolean"},"terrainTag":{"description":"Terrain tag 0–7 (0 = none).","maximum":7,"minimum":0,"type":"integer"},"tileId":{"description":"The raw tile id whose flags to edit","maximum":9007199254740991,"minimum":0,"type":"integer"},"tilesetId":{"description":"Tileset id (from Tilesets.json / the map)","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["tilesetId","tileId"],"type":"object"},"name":"set_tile_flags"},{"description":"Get system data","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"get_system"},{"description":"Get all game variable names","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"get_variables"},{"description":"Set a variable name. Grows the project's variable list if the id is past the end (padded to the editor's 20-slot block), so an id from next_free_id can always be labelled. Naming a variable as soon as you claim it is what makes it visible to the next session — see list_allocated_ids.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"name":{"description":"The name to assign","type":"string"},"variableId":{"description":"The 1-based variable ID","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["variableId","name"],"type":"object"},"name":"set_variable_name"},{"description":"Get all game switch names","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"get_switches"},{"description":"Set a switch name. Grows the project's switch list if the id is past the end (padded to the editor's 20-slot block), so an id from next_free_id can always be labelled. Naming a switch as soon as you claim it is what makes it visible to the next session — see list_allocated_ids.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"name":{"description":"The name to assign","type":"string"},"switchId":{"description":"The 1-based switch ID","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["switchId","name"],"type":"object"},"name":"set_switch_name"},{"description":"Get the game title","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"get_game_title"},{"description":"Update the game title","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"title":{"description":"The new game title","type":"string"}},"required":["title"],"type":"object"},"name":"update_game_title"},{"description":"Get the title screen settings: title1Name/title2Name (background layers, from list_assets(\"titles1\"/\"titles2\") — title2Name draws over title1Name), titleBgm (the AudioFile that plays while it is shown), and drawTitle (whether the game title text is drawn over the art).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"get_title_screen"},{"description":"Update the title screen: background layers (title1Name/title2Name, basenames from list_assets(\"titles1\"/\"titles2\")), the BGM that plays while it is shown, and/or whether the game title text is drawn over the art. Only the provided fields are changed. Warns (never blocks) when an image/audio name is not a known asset. Returns the updated title screen settings.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"drawTitle":{"description":"Whether to draw the game title text over the background art (the editor's \"Draw Game Title\" option)","type":"boolean"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"title1Name":{"description":"Background image basename from list_assets(\"titles1\") (the far layer)","type":"string"},"title2Name":{"description":"Background image basename from list_assets(\"titles2\") (drawn over title1Name)","type":"string"},"titleBgm":{"description":"BGM that plays while the title screen is shown","properties":{"name":{"description":"Audio basename from list_assets(\"bgm\")","type":"string"},"pan":{"description":"Pan -100–100 (default 0)","type":"number"},"pitch":{"description":"Pitch 50–150 (default 100)","type":"number"},"volume":{"description":"Volume 0–100 (default 90)","type":"number"}},"required":["name"],"type":"object"}},"type":"object"},"name":"update_title_screen"},{"description":"Get the game starting position ({ mapId, x, y })","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"get_starting_position"},{"description":"Update the game starting position","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"mapId":{"description":"Starting map ID","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"x":{"description":"Starting x tile","maximum":9007199254740991,"minimum":0,"type":"integer"},"y":{"description":"Starting y tile","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["mapId","x","y"],"type":"object"},"name":"update_starting_position"},{"description":"Get the starting party — the actor ids the game begins with. Returns `{ partyMembers }`, rhyming with set_party's input/output shape.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"get_party"},{"description":"Set the starting party (the actor ids the game begins with, in order). Every id must reference an existing actor.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"partyMembers":{"description":"Ordered actor ids for the starting party","items":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"type":"array"}},"required":["partyMembers"],"type":"object"},"name":"set_party"},{"description":"Get the game vocabulary/terms: the `basic`, `commands`, `params` string arrays and the `messages` map (menu labels, system messages).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"get_terms"},{"description":"Set one vocabulary term. For category 'basic'/'commands'/'params' the key is a numeric index (as a string); for 'messages' it's a message key (e.g. 'actorDamage'). Returns the updated terms.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"category":{"description":"Which term group to edit","enum":["basic","commands","params","messages"],"type":"string"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"key":{"description":"Index (for basic/commands/params) or message key (for messages)","type":"string"},"value":{"description":"The new term text","type":"string"}},"required":["category","key","value"],"type":"object"},"name":"set_term"},{"description":"Get one System.json type-name array — the named lists other data references by index: elements, skillTypes, weaponTypes, armorTypes, or equipTypes.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"category":{"description":"Which type-name array to read","enum":["elements","skillTypes","weaponTypes","armorTypes","equipTypes"],"type":"string"}},"required":["category"],"type":"object"},"name":"get_types"},{"description":"Rename one entry in a System.json type-name array (elements/skillTypes/weaponTypes/armorTypes/equipTypes). Index 0 is the conventional empty slot. Returns the updated array.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"category":{"description":"Which type-name array to edit","enum":["elements","skillTypes","weaponTypes","armorTypes","equipTypes"],"type":"string"},"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"index":{"description":"Index within the array (0 = empty slot)","maximum":9007199254740991,"minimum":0,"type":"integer"},"name":{"description":"The new type name","type":"string"}},"required":["category","index","name"],"type":"object"},"name":"set_type_name"},{"description":"Set the currency unit shown next to gold amounts (e.g. \"G\", \"Gold\").","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"unit":{"description":"The currency unit string","type":"string"}},"required":["unit"],"type":"object"},"name":"set_currency_unit"},{"description":"List the available asset filenames (extension stripped) for one asset kind — the exact names RPG Maker's data references (a sprite/face/tileset/audio name). Use it to validate a graphic or audio name before wiring it into an event; a wrong filename fails silently at runtime. Fails soft: an unused asset directory returns an empty list.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"type":{"description":"Asset kind to list. Images: characters, faces, tilesets, pictures, parallaxes, battlebacks1, battlebacks2, enemies, sv_actors, sv_enemies, titles1, titles2, system. Audio: bgm, bgs, me, se.","enum":["characters","faces","tilesets","pictures","parallaxes","battlebacks1","battlebacks2","enemies","sv_actors","sv_enemies","titles1","titles2","system","bgm","bgs","me","se"],"type":"string"}},"required":["type"],"type":"object"},"name":"list_assets"},{"description":"Cheap names-only index for a database table. Returns { id, name } entries instead of full records — use it to look up or sanity-check IDs before wiring them into events, without paying the token cost of a full get_*/search_* dump.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"type":{"description":"Which table to index: actors, classes, items, weapons, armors, skills, enemies, troops, states, common_events, tilesets, or maps.","enum":["actors","classes","items","weapons","armors","skills","enemies","troops","states","common_events","tilesets","maps"],"type":"string"}},"required":["type"],"type":"object"},"name":"list_names"},{"description":"Read a database table in full: actors, classes, items, weapons, armors, skills, enemies, troops, states, or common_events. Returns the raw 1-indexed array (slot 0 is null), or — with `id` — that single record, or null if no such record exists. These are full records: prefer list_names for an id→name index, or search_actors/search_items/search_skills to find records by name, and reach for this only when you need every field. Maps and tilesets are not here: use get_map_infos/get_map and get_tilesets/get_tile_flags. Read-only.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"id":{"description":"Return just this record (null if missing); omitted = the whole table","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"type":{"description":"Which table to read: actors, classes, items, weapons, armors, skills, enemies, troops, states, or common_events.","enum":["actors","classes","items","weapons","armors","skills","enemies","troops","states","common_events"],"type":"string"}},"required":["type"],"type":"object"},"name":"get_database"},{"description":"Validate a single event's command lists against the known RPG Maker MZ command table, plus its placement against the tile it sits on: an action-button page with priority below on an impassable tile (can never trigger) and an invisible wall (a graphic-less, priority-same, non-through page on a walkable tile — the player bumps into nothing; an action-button page over a drawn B–E object is exempt, as the solid-landmark idiom). Read-only: reports warnings without changing anything.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"eventId":{"description":"The ID of the event to validate","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"mapId":{"description":"The ID of the map","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["mapId","eventId"],"type":"object"},"name":"validate_event"},{"description":"Validate the event command lists of every map in the project, plus each event's placement (action-button-below on an impassable tile; graphic-less priority-same invisible walls on walkable tiles, except action-button pages over a drawn B–E object). Read-only: returns aggregated, map-tagged warnings for auditing before or after a batch of edits.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"validate_project"},{"description":"Audit cross-file reference integrity across the whole project (read-only, warn-by-default): Transfer Player targets and starting position point at existing maps; starting party, actor classes, class/enemy skills, troop members, enemy drops, and skill/item effects (states, learned skills, common events, animations) all resolve; event commands that name a record (Change Items/Weapons/Armors, Change Party Member, Battle Processing, Shop Processing, Change State/Skill, Common Event) and map random encounters point at existing rows; and the map tree has no dangling or cyclic parentId. Complements validate_project (which checks command shape). Returns { ok, warnings[] }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"validate_references"},{"description":"Audit asset-filename integrity across the whole project (read-only, warn-by-default): every image/audio name field — actor characterName/faceName/battlerName, enemy battlerName, tileset sheets, map bgm/bgs/parallax/battlebacks, event page graphics, event Play BGM/BGS/ME/SE / Show Picture / Show Text face / Change Actor Images, and system titles/battlebacks/default audio/vehicle graphics — is checked against the files present under img/ and audio/. Catches a wrong filename (e.g. a battlerName with no matching img/enemies/*.png) before it becomes a runtime \"Failed to load\" error. An asset kind whose directory is empty/missing is skipped (not flagged). Complements validate_references (which checks id integrity). Returns { ok, warnings[] }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"validate_assets"},{"description":"Show which switch / variable / common-event IDs are already spoken for, derived from the project's own JSON (never a hand-maintained list, which would drift the moment someone edited in the RPG Maker editor). An id counts as allocated if it is declared (a System.json label, a CommonEvents row) OR referenced anywhere — event page conditions and command lists, common events, troop pages, and Common Event skill/item effects. Use this before reusing an id, and pass `id` to answer \"where is switch 23 actually used?\" before touching it. Returns { count, highest, gaps, declaredCapacity, allocated[], coverage }. Read-only. To claim a fresh id instead, use next_free_id.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"id":{"description":"Report just this id — whether it is allocated, its label, and every place it is referenced. Omitted = the whole namespace.","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"type":{"description":"Which id namespace: switch, variable, or common_event. Database rows (actors, items, …) are not here — create_*/batch_create assign those ids, and list_names shows what exists.","enum":["switch","variable","common_event"],"type":"string"}},"required":["type"],"type":"object"},"name":"list_allocated_ids"},{"description":"Reserve the next unallocated switch / variable / common-event ID(s) instead of picking one by hand. Ids are handed out strictly above every id already declared or referenced, so two sessions editing the same project over time cannot silently claim the same switch — a collision that never crashes and only surfaces hours into a playtest as a door that is inexplicably already open. Pass `reuseGaps: true` to fill holes below the highest id first (off by default: a hole is often an id claimed in notes but not yet written). Read-only — it suggests ids, it does not write them; name what you take with set_switch_name / set_variable_name so the next session sees the claim.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"count":{"description":"How many consecutive free ids to return (default 1)","exclusiveMinimum":0,"maximum":100,"type":"integer"},"reuseGaps":{"description":"Fill unallocated holes below the highest id first (default false)","type":"boolean"},"type":{"description":"Which id namespace: switch, variable, or common_event. Database rows (actors, items, …) are not here — create_*/batch_create assign those ids, and list_names shows what exists.","enum":["switch","variable","common_event"],"type":"string"}},"required":["type"],"type":"object"},"name":"next_free_id"},{"description":"Create many database records of one type in a single call and a single file write — the batch sibling of create_actor/create_item/create_weapon/create_armor/create_skill/create_enemy/create_state/create_class. Each entry in `records` takes the same fields its single create_* tool accepts (only `name` is required for most; omitted fields use the editor's defaults). Ids are allocated sequentially from the current max, so a record can reference a sibling created earlier in the same batch. Use this instead of N sequential create_* calls when authoring a cast, a loot table, or a skill list. Returns `{ type, count, created, warnings? }` (classes are summarized like create_class; enemy battlerName misses and record fields the create_* tool doesn't accept are warnings, never blocked). Throws — writing nothing at all — if any record references a database id that does not exist, naming the offending records[i].","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"records":{"description":"The records to create, each shaped like the matching create_* tool's arguments (e.g. for type \"actor\": { name, classId?, ... })","items":{"additionalProperties":{},"propertyNames":{"type":"string"},"type":"object"},"minItems":1,"type":"array"},"type":{"description":"Which database the records are appended to","enum":["actor","item","weapon","armor","skill","enemy","state","class"],"type":"string"}},"required":["type","records"],"type":"object"},"name":"batch_create"},{"description":"Delete one database record (actor, class, skill, item, weapon, armor, enemy, troop, state, or common_event) by nulling its slot — ids never shift, so nothing else is renumbered. Reports every reference the deletion would leave dangling (an actor's class, a troop member, a Change Items / Shop / Battle Processing command, a skill effect, the starting party, …; found with the same audit validate_references runs, see `coverage` in the response) and REFUSES, writing nothing, when there are any — pass force: true to delete anyway, or dryRun: true to preview the references without throwing. Deleting skill 1 (Attack), skill 2 (Guard) or state 1 (Knockout) is always reported, since the engine hard-codes them. Returns { type, deleted: { id, name }, referenceCount, references[], coverage }.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"force":{"description":"Write even if validation finds structural problems (wrong parameter count, unterminated command list). Off by default: such a write is refused and nothing is written. Advisory warnings never block regardless.","type":"boolean"},"id":{"description":"The id of the record to delete","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"type":{"description":"Which database table: actor, class, skill, item, weapon, armor, enemy, troop, state, or common_event","enum":["actor","class","skill","item","weapon","armor","enemy","troop","state","common_event"],"type":"string"}},"required":["type","id"],"type":"object"},"name":"delete_record"},{"description":"Clear a whole database table (actor, class, skill, item, weapon, armor, enemy, troop, state, or common_event) except the ids in `keep` — e.g. reset_table('skill', { keep: [1, 2] }) wipes the RTP skills but keeps Attack/Guard, the usual first step before authoring your own database with batch_create. Kept records stay at their own id; the rest become null and trailing empty slots are trimmed (the table is [null] when nothing is kept). Like delete_record it REFUSES, writing nothing, when the removal would leave references dangling (map events giving removed items, troops of removed enemies, …) unless force: true; use dryRun: true first to see what disappears and what would break. Returns { type, kept[], removedCount, removed[], referenceCount, references[], coverage } (lists are capped at 100).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dryRun":{"description":"Preview only: return a diff of what would change without writing to disk.","type":"boolean"},"force":{"description":"Write even if validation finds structural problems (wrong parameter count, unterminated command list). Off by default: such a write is refused and nothing is written. Advisory warnings never block regardless.","type":"boolean"},"keep":{"description":"Ids to keep (each must exist); omitted = remove every record","items":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"type":"array"},"type":{"description":"Which database table: actor, class, skill, item, weapon, armor, enemy, troop, state, or common_event","enum":["actor","class","skill","item","weapon","armor","enemy","troop","state","common_event"],"type":"string"}},"required":["type"],"type":"object"},"name":"reset_table"},{"description":"Discover the plugin commands this project actually has, by parsing the @command/@arg annotations in js/plugins/*.js and the enabled/disabled state in js/plugins.js. Use it to find out what create_plugin_command can call and with which args — it reports every command's key, label, description and args (name/type/default), plus whether the plugin is enabled in the editor's Plugin Manager (a disabled plugin's commands never run). create_plugin_command validates against this scan automatically, so you don't need to call this first; it's for discovery. Pass pluginName to narrow to one plugin, or enabledOnly:true to skip plugins that are installed but switched off. Read-only. NOTE: MZ has no 'required argument' annotation, so scanned args are checked for unknown names only, never for missing ones.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"enabledOnly":{"description":"Only report plugins enabled in js/plugins.js (default false)","type":"boolean"},"pluginName":{"description":"Optional: restrict to one plugin (its filename without .js)","type":"string"}},"type":"object"},"name":"scan_plugins"},{"description":"Export a pruned HTML5 web deployment (for itch.io or any static host): copies index.html, js/, css/, fonts/, icon/ and data/*.json, plus only the img/audio/movies files the game references (every string in data/*.json, string literals in the core js and plugins, plugin @default annotations; img/system is always kept) and only the effects/*.efkefc Effekseer effects actually referenced (an animation's effectName, a Plugin Command argument, or a plugin parameter/string — not other data strings) together with the textures/models they list internally. Writes the folder to outDir and, by default, <outDir>.zip with index.html at the archive root. Returns file/byte counts, kept/dropped asset counts (+ dropped paths), the screen size from System.advanced (the itch embed size), and warnings for itch's 1000-file / 200 MB-per-file limits. Writes nothing inside the project; outDir must be outside the project's copied folders, and an existing non-empty outDir is only replaced if it was a previous export_web output. Follow up with a playtest of the exported build.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"outDir":{"description":"Folder to write the deployment into (absolute, or relative to the project root). Must not be the project folder or inside its img/audio/data/js/… folders.","type":"string"},"prune":{"description":"Drop img/audio/movies/effects files nothing references (default true). Set false to copy every asset — the escape hatch if a plugin builds asset names at runtime.","type":"boolean"},"zip":{"description":"Also write <outDir>.zip with index.html at the archive root (default true).","type":"boolean"}},"required":["outDir"],"type":"object"},"name":"export_web"},{"description":"Screenshot a map as the game actually draws it: boots the project headless, starts a new game on the map, and saves a PNG. Validators prove structure, not looks — use this to catch wrong wall/autotile kinds, void (unbased transparent tiles), odd sprites or missing images. Default renders the WHOLE map (canvas resized to width×height×48px, player hidden, autorun/parallel events frozen, map-name banner off); pass x+y for a normal 816×624 game-screen view centred on that tile. Returns the PNG path plus `problems` — console errors, page errors and HTTP 404s (missing assets — a missing image is drawn blank instead of stopping the engine on its load-error retry screen). Read-only. Needs the optional dependency playwright-core and a Chromium from the Playwright cache (`npx playwright install chromium-headless-shell`) or the RPGMAKER_MCP_CHROMIUM env var.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"inline":{"description":"Also return the PNG(s) as image content in the response (default false: paths only — read the file to view it).","type":"boolean"},"mapId":{"description":"Map to render.","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"out":{"description":"Output .png path, or a directory. Default: <os tmpdir>/rpgmaker-mz-mcp/renders.","type":"string"},"runEvents":{"description":"Let autorun/parallel events run before the shot (default false: resting map).","type":"boolean"},"showEvents":{"description":"Draw event sprites (default true). false = bare tiles only.","type":"boolean"},"showPlayer":{"description":"Draw the player (default: hidden for a whole-map render, shown for a view).","type":"boolean"},"switches":{"description":"Switch ids to turn ON first, to see event pages of a later story state.","items":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"type":"array"},"x":{"description":"With y: render a normal screen view centred on this tile instead of the whole map.","maximum":9007199254740991,"minimum":0,"type":"integer"},"y":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["mapId"],"type":"object"},"name":"render_map"},{"description":"Play the game headless from a script of steps and report what happened — the runtime check validators cannot do (does the door transfer, does the NPC say the right thing, does the choice branch, is there an invisible wall). One browser session runs the whole script; each step reports its outcome and the run stops at the first failing step. Steps: `load` {mapId,x,y,direction?,party?,level?,gold?,switches?,variables?,selfSwitches?,items?,equip?,encounters?} starts a fresh game there (random encounters off unless encounters:true); `startEvent` {eventId} starts a map event as if triggered and lets it run until it shows text or goes idle (waiting out any transfer — reported as `transferredTo`); `advanceText` {maxMs?} presses OK until the event is idle, STOPPING at an open choice list/battle — returns the map message `lines` shown and any open choices (text shown during a battle comes back separately as `battleLines`); `choose` {index} picks a 0-based choice; `walk` {direction, steps?} walks tile by tile, reporting where it ended (`to`); if a tile refused entry, `stoppedAt` (the player's tile) and `blockedTile` (the refused one); when a step fires a touch event (a door) it stops, waits out the transfer and reports `transferredTo` {mapId,x,y}, plus `eventRunning`/`messageOpen` if the event is still going; `press` {button, times?}; `wait` {ms}; `autoBattle` {troopId?, canEscape?, canLose?, maxMs? (default 60000)} fights (a started or new battle) on auto AI until it ends, returning the battle's message `lines` (troop events, victory text). Battles are fast-forwarded (20 engine frames per drawn frame: same logic, same odds, a 10-turn boss fight in seconds) unless the run sets realtime: true; `screenshot` {name?} saves a PNG; `eval` {script} evaluates a JS expression in the game page and returns its value (e.g. \"$gameSwitches.value(3)\"). Reported text reads as the message window shows it: \\V[n]/\\N[n]/\\P[n]/\\G expanded, control codes (\\C[n], \\I[n], \\., \\| …) removed. Every step result carries ok; the response ends with finalState (scene, map, position, gold, party) and problems (console/page errors, HTTP 404s). Max 200 steps. Read-only: never writes the project. A run can take MINUTES (booting ~5-10 s, long cutscenes, realtime battles): clients should raise their request timeout, or send a progressToken with resetTimeoutOnProgress — the tool then sends a progress notification per step and every 5 s during long ones. Split long scripts into several runs if your client can do neither. Needs the optional dependency playwright-core and a Chromium from the Playwright cache (`npx playwright install chromium-headless-shell`) or the RPGMAKER_MCP_CHROMIUM env var.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"inline":{"description":"Also return the PNG(s) as image content in the response (default false: paths only — read the file to view it).","type":"boolean"},"out":{"description":"Directory for screenshot PNGs. Default: <os tmpdir>/rpgmaker-mz-mcp/renders.","type":"string"},"realtime":{"description":"Play battles at real-time speed (default false: battles are fast-forwarded). Real time takes ~10-20x longer — raise autoBattle maxMs to match.","type":"boolean"},"steps":{"description":"The script, run in order.","items":{"oneOf":[{"properties":{"action":{"const":"load","type":"string"},"direction":{"description":"Facing on arrival (default down).","enum":["up","down","left","right"],"type":"string"},"encounters":{"description":"Keep random encounters on (default off, so walks are deterministic).","type":"boolean"},"equip":{"items":{"properties":{"actorId":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"id":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"kind":{"enum":["weapon","armor"],"type":"string"},"slot":{"description":"Equip slot index (0 weapon, 1 shield, …).","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["actorId","slot","kind","id"],"type":"object"},"type":"array"},"gold":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"items":{"description":"Inventory to add ({kind default \"item\", id, count default 1}).","items":{"properties":{"count":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"id":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"kind":{"enum":["item","weapon","armor"],"type":"string"}},"required":["id"],"type":"object"},"type":"array"},"level":{"description":"Set every party member to this level.","maximum":99,"minimum":1,"type":"integer"},"mapId":{"description":"Map to start on.","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"party":{"description":"Actor ids, replacing the starting party.","items":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"type":"array"},"selfSwitches":{"items":{"properties":{"eventId":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"letter":{"enum":["A","B","C","D"],"type":"string"},"mapId":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"value":{"type":"boolean"}},"required":["mapId","eventId","letter"],"type":"object"},"type":"array"},"switches":{"description":"Switch ids to turn ON.","items":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"type":"array"},"variables":{"additionalProperties":{"type":"number"},"description":"Variable id → value, e.g. {\"3\": 2}.","propertyNames":{"type":"string"},"type":"object"},"x":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"y":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["action","mapId","x","y"],"type":"object"},{"properties":{"action":{"const":"startEvent","type":"string"},"eventId":{"description":"Map event id on the current map.","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["action","eventId"],"type":"object"},{"properties":{"action":{"const":"advanceText","type":"string"},"maxMs":{"description":"Give up after this long (default 15000).","exclusiveMinimum":0,"maximum":120000,"type":"integer"}},"required":["action"],"type":"object"},{"properties":{"action":{"const":"choose","type":"string"},"index":{"description":"0-based choice to pick in the open choice list.","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["action","index"],"type":"object"},{"properties":{"action":{"const":"walk","type":"string"},"direction":{"enum":["up","down","left","right"],"type":"string"},"steps":{"description":"Tiles to walk (default 1).","maximum":100,"minimum":1,"type":"integer"}},"required":["action","direction"],"type":"object"},{"properties":{"action":{"const":"press","type":"string"},"button":{"enum":["ok","cancel","up","down","left","right","shift","pageup","pagedown"],"type":"string"},"times":{"maximum":50,"minimum":1,"type":"integer"}},"required":["action","button"],"type":"object"},{"properties":{"action":{"const":"wait","type":"string"},"ms":{"maximum":60000,"minimum":0,"type":"integer"}},"required":["action","ms"],"type":"object"},{"properties":{"action":{"const":"autoBattle","type":"string"},"canEscape":{"type":"boolean"},"canLose":{"type":"boolean"},"maxMs":{"description":"Give up after this long (default 60000).","exclusiveMinimum":0,"maximum":600000,"type":"integer"},"troopId":{"description":"Start this troop now; omit to fight a battle an event already started.","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["action"],"type":"object"},{"properties":{"action":{"const":"screenshot","type":"string"},"name":{"description":"File basename (default step<N>).","type":"string"}},"required":["action"],"type":"object"},{"properties":{"action":{"const":"eval","type":"string"},"script":{"description":"A JS expression evaluated in the game page; its JSON-serializable value is returned.","type":"string"}},"required":["action","script"],"type":"object"}]},"maxItems":200,"minItems":1,"type":"array"}},"required":["steps"],"type":"object"},"name":"run_playtest"}]}}}
