Skip to main content
Glama

build_event_commands

Read-onlyIdempotent

Create validated RPG Maker MV event-command fragments without files or a selected project; feed them to insert_event_commands or nest in choice/conditional builders.

Instructions

Build a validated RPG Maker MV event-command fragment without writing files or requiring a selected project. Returns {commands, warnings?}; feed commands to insert_event_commands, or nest them in a choice/conditional builder. kind selects the command; only fields belonging to that kind are accepted. Troop-only kinds: enemy_appear, change_enemy_state, abort_battle. Fragments omit the root end marker; complete branches include their required nested end markers. MV Show Text has four parameters (no MZ speakerName); plugin_command emits MV code 356, never MZ 357. IDs accept integers or whole decimal integer strings; constants accept finite numbers. Supported game references are checked when inserting into a project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNo
yNo
panNo
fadeNo
kindYes
nameNocontrol_switch self_switch: A-D; flow label/jump_to_label: label text; play_audio: file name without extension (empty stops the channel); show_picture: picture file.
statNochange_actor: hp takes allowDeath; exp/level take showLevelUp; state takes stateId and remove.
textNoplugin_command: full MV command string, e.g. "DoorCtl open 1".
waitNoWait for the effect, animation, balloon or move route to finish (move_route default true).
wrapNoshow_text: true reflows all lines as one paragraph, "hard" keeps each line as a break; both split into 4-line boxes. Width ~55 chars, ~38 with a face.
blendNo
colorNo
endIdNocontrol_switch/control_variable: inclusive final ID; defaults to the starting ID.
goodsNoshop_processing: goods in order; omit price to use the database price.
linesNoshow_text: message lines. MV does not wrap; long lines are warned about unless wrap is set.
mapIdNo
pitchNo
powerNo
scopeNocontrol_switch: switch requires switchId; self_switch requires name A-D.
speedNo
stepsNomove_route: steps in order; times repeats one. toward/away are relative to the player. Parameters: jump x,y; wait frames; switch_on/off switchId; change_speed value 1-6; change_freq value 1-5; change_image name,index; change_opacity value 0-255; change_blend_mode value 0-3; play_se name,volume?,pitch?,pan?; script text.
valueNocontrol_switch: default on.
actionNoflow: wait requires frames; label/jump_to_label require name.
amountNochange_gold/change_items/change_actor hp|mp|exp|level: constant amount. Give amount or amountVariableId.
effectNoscreen_effect. tint: color [r,g,b,gray] -255..255; flash: color [r,g,b,strength] 0..255; shake: power, speed 1-9.
framesNo
indentNoBase indentation, default 0. Nested branch bodies are rebased without mutating their inputs.
itemIdNo
originNo
removeNochange_party_member, change_actor state, change_enemy_state: remove instead of add.
repeatNomove_route: loop the route. Default false.
scaleXNo
scaleYNo
volumeNo
actorIdNochange_party_member/name_input: actor ID. change_actor: actor ID, 0 = entire party (or use actorVariableId).
canLoseNo
channelNoplay_audio.
choicesNo
opacityNo
operandNocontrol_variable: {type:"constant",value}; {type:"variable",variableId}; {type:"random",min,max}; or {type:"game_data",dataType:0..7,param1?,param2?}. MZ game-data type 8 is rejected.
stateIdNo
troopIdNobattle_processing: give troopId, troopVariableId, or randomEncounter: true.
branchesNoshow_choices: one command fragment per choice. Omit for empty branches.
decreaseNoSubtract instead of add. Default false.
durationNoscreen_effect: frames, default 60.
faceNameNoshow_text: face image basename, default empty.
itemTypeNochange_items, default item.
positionNoshow_text: top/middle/bottom; show_choices: left/middle/right.
switchIdNo
balloonIdNo1-15 as in the editor list (1 exclamation).
canEscapeNo
conditionNoconditional_branch: switch {type,switchId,value?}; self_switch {type,name,value?}; variable {type,variableId,comparison,constant? OR variableOperand?}; actor_in_party {type,actorId}; gold {type,gold,compare?}; item {type,itemId}. Only keys for the selected type are allowed.
directionNo
faceIndexNoshow_text: face slot 0-7, default 0.
maxLengthNoname_input: 1-16, default 8.
operationNo
pictureIdNoshow_picture/erase_picture: slot 1-100.
skippableNomove_route: skip a step that cannot be performed. Default false.
winBranchNobattle_processing: result branches, only when canEscape or canLose.
wrapWidthNoshow_text: override the wrap width in characters.
allowDeathNo
backgroundNoText/choice window background.
cancelTypeNoshow_choices: -1 disables cancel; -2 or choices.length selects the separate cancel branch; otherwise a zero-based choice index.
elseBranchNo
enemyIndexNoTroop slot from 0; change_enemy_state also accepts -1 for the entire troop.
initializeNochange_party_member: reset the actor when adding.
loseBranchNo
thenBranchNo
variableIdNo
animationIdNo
characterIdNoshow_animation/show_balloon/move_route: -1 player, 0 this event (default), n map event n.
defaultTypeNoshow_choices: selected choice index, or -1 for none.
designationNotransfer_player/show_picture: whether the coordinates are literal values or variable IDs.
showLevelUpNo
cancelBranchNoshow_choices: commands for a separate cancel branch.
escapeBranchNo
includeEquipNochange_items weapon/armor: also remove equipped copies.
purchaseOnlyNo
commonEventIdNo
actorVariableIdNo
randomEncounterNo
troopVariableIdNo
amountVariableIdNoUse this variable's value as the amount.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.19.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare the safe pure-function profile (readOnly, idempotent, non-destructive, closed-world), so the bar is lower, yet the description still adds substantial context beyond them: no file writes, no project selection needed, the return shape {commands, warnings?}, the end-marker convention for fragments vs branches, and that game-reference validation is deferred to insert time.

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?

Appropriately sized for an 83-parameter tool and front-loaded with the core purpose and routing before the finer MV/MZ semantics. It is a dense single paragraph with no wasted sentence, though the lack of any structural breaks makes the later constraints harder to scan.

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

Completeness4/5

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

No output schema exists, but the description does explain the return value ({commands, warnings?}), which is the key gap it needed to close. Combined with the fragment/branch nesting rules and MV-vs-MZ caveats, it is largely complete for this complexity, though the 46% of undocumented parameters leave some functional territory uncovered.

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

Parameters4/5

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

Schema description coverage is only 54% across 83 parameters, so the description must compensate, and it does add real cross-parameter semantics: 'kind selects the command; only fields belonging to that kind are accepted,' the troop-only kind list, the MV Show Text four-parameter rule, plugin_command emitting code 356, and the integer-or-decimal-string ID rule. It still leaves many individual parameters undocumented, so not a 5.

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?

States a specific verb+resource (build an RPG Maker MV event-command fragment) and immediately scopes it against the sibling that actually writes ('without writing files or requiring a selected project'). An agent can distinguish this from insert_event_commands without opening either schema.

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

Usage Guidelines4/5

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

Explicitly routes the agent: 'feed commands to insert_event_commands, or nest them in a choice/conditional builder,' which names the downstream alternative and the compose-vs-insert choice. It does not state any when-not condition or prerequisites for this tool itself, so it stops short of a full 5.

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