Skip to main content
Glama

manage_map_event

Destructive

Create, update, or remove events on a map. Supports preset recipes for NPCs, chests, teleports, doors, shops, inns, bosses, and puzzle switches, plus low-level commands.

Instructions

Create, modify or remove events on a map; the map file is written immediately. action "create" without preset makes a low-level event at x/y (empty page unless pages given; add behavior later with add_command). action "create" WITH preset builds a complete, ready-to-play event: "npc" (2-page dialogue NPC: {name, dialogues[], characterName?, characterIndex?}), "chest" (one-time loot: {items: [{type: item|weapon|armor, id, amount}]} — IDs not validated, confirm with query_database), "teleport" (one-way walk-on transfer zone: {destMapId, destX, destY, trigger?} — destination not validated), "door" (action-button warp into another map, e.g. a house entrance: {destMapId, destX, destY, characterName?, characterIndex?, trigger?, lockedSwitchId?, lockedMessage?}; with lockedSwitchId it shows a "locked" message until that game switch is ON), "shop" ({goods: [[type 0=item/1=weapon/2=armor, id, priceType 0=standard/1=custom, price]]}), "inn" ({cost?} full-recovery flow with gold check), "boss" ({troopId} one-time battle, game over on loss), "puzzle_switch" ({switchX, switchY, doorX, doorY, gameSwitchId, switchName?, doorName?} creates TWO linked events). action "update" overwrites only fields on an event; "delete" removes it permanently (DESTRUCTIVE); "add_command" appends one command before a page's terminator; "populate" scatters N events of a kind (npc/chest/boss) at random positions (walkability not checked — validate with query_map "ascii"). Returns the created/updated event(s) with ids. Fails with an error if the map (or event, for update/delete) does not exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesWhat to do; see the tool description. Default "create"
presetNoaction "create" only: ready-made event recipe; omit for a low-level empty event
mapIdYesMap the event lives on (always required)
xNoTile X position (0-based; create/presets except puzzle_switch)
yNoTile Y position (0-based)
nameNoEvent name shown in the editor
eventIdNoExisting event ID (update/delete/add_command); find it with query_map view "events"
fieldsNoaction "update": properties to overwrite, e.g. {"x": 5, "y": 9} or {"pages": [...]} (replaces all pages)
triggerNoHow the event activates: 0=action button, 1=player touch, 2=event touch, 3=autorun, 4=parallel
pagesNoaction "create" without preset: full event page objects (optional)
commandNoaction "add_command": event command {code, indent, parameters}; e.g. 201=Transfer Player [0, mapId, x, y, dir, fade]
pageIndexNoaction "add_command": which page receives the command (0-based, default 0)
dialoguesNopreset "npc": dialogue lines, each becomes one text box
itemsNopreset "chest": loot [{type: "item"|"weapon"|"armor", id, amount}]
goodsNopreset "shop": wares [[type, id, priceType, price]] — priceType 1 uses the custom price, 0 the database price
destMapIdNopreset "teleport"/"door": destination map ID
destXNopreset "teleport"/"door": destination tile X (should be walkable)
destYNopreset "teleport"/"door": destination tile Y
lockedSwitchIdNopreset "door": if set, the door shows lockedMessage until this game switch is ON, then warps
lockedMessageNopreset "door": message shown while locked (default "It's locked.")
costNopreset "inn": gold charged for a full recovery (default 50)
troopIdNopreset "boss" / populate boss: troop to battle (create it first via create_database_entry preset encounter_troop)
characterNameNoSprite sheet from img/characters/ without extension; list options with get_project_context
characterIndexNoWhich of the 8 characters in the sheet (0-7)
switchXNopreset "puzzle_switch": floor-switch tile X
switchYNopreset "puzzle_switch": floor-switch tile Y
doorXNopreset "puzzle_switch": door tile X
doorYNopreset "puzzle_switch": door tile Y
gameSwitchIdNopreset "puzzle_switch": game switch linking switch and door — pick an unused ID via manage_system get switches
switchNameNopreset "puzzle_switch": editor name for the switch event (default "Switch")
doorNameNopreset "puzzle_switch": editor name for the door event (default "Door")
eventTypeNoaction "populate": kind of events to scatter — "npc", "chest" or "boss"
countNoaction "populate": how many events (default 3)
optsNoaction "populate": overrides {name, troopId, x, y}
Behavior5/5

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

Beyond annotations marking destructiveHint=true, the description adds critical behavioral context: writes occur immediately, delete is permanent (DESTRUCTIVE), IDs and destinations are not validated, and failure conditions (e.g., map not found) return errors. This fully compensates for the annotation burden.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but well-structured, front-loading the main actions and using clear separations for presets. Every sentence adds value, though some redundancy exists (e.g., repeating 'action's in each preset bullet). It earns its length due to the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's high complexity (34 parameters, multiple actions/presets) and lack of output schema, the description covers all necessary context: return values (event(s) with ids), error conditions, validation advice, and prerequisites. It is fully self-contained for an AI agent to use correctly.

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

Parameters5/5

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

While schema coverage is 100%, the description adds substantial meaning beyond parameter names: it explains the difference between create with/without preset, details each preset's behavior, and clarifies how parameters interact (e.g., lockedSwitchId with lockedMessage for doors). Many parameters (e.g., pages, command, opts) are given context that the schema alone lacks.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states "Create, modify or remove events on a map" with a specific verb and resource. It distinguishes itself from sibling tools like query_map (read events) and edit_map (tiles) by focusing on event lifecycle management, and it enumerates all supported actions and presets.

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

Usage Guidelines5/5

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

Provides explicit guidance on when to use each action and preset, including warnings such as "IDs not validated, confirm with query_database" for chests and "walkability not checked — validate with query_map" for populate. It also advises on prerequisite steps (e.g., create_troop before boss) and appropriate sibling tools for validation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DiegoLopez0208/RpgMakerMVUltimate-MCP'

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