create map event
create_map_eventCreates a map event at tile coordinates with one or more configurable pages, returning a validated preview and optionally committing the changes.
Instructions
Create a map event with a new ID (lowest free slot, as the editor does) and one or more pages. Each page: {settings?, blocks?}. Defaults match a blank editor page (action button, below characters, no graphic).
Preview-first: returns a change set (semantic + native diff, validation). Pass apply=true to commit immediately when the preview is clean.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mapId": "<mapId>",
"x": "<x>",
"y": "<y>"
},
"name": "create_map_event"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Tile X | |
| y | Yes | Tile Y | |
| name | No | Event name (default "EVxxx") | |
| note | No | ||
| apply | No | Commit right after a successful preview (non-destructive operations only; needs --allow-write; warnings also need acknowledgeWarnings). Default false = preview only. | |
| mapId | Yes | Map ID (from list_maps) | |
| pages | No | Pages in order (pageIndex 0 first); default one blank page | |
| allowScript | No | true ONLY if the user explicitly asked to insert JavaScript (script commands, script conditions/operands, route scripts). | |
| description | No | Optional description stored in the transaction log | |
| acknowledgeWarnings | No | Accept validation warnings when apply=true. Review them with the user first. |