Skip to main content
Glama

Evaluate in the running game

live_eval

Inspect and modify a live RPG Maker MZ playtest by executing JavaScript expressions, returning the result and awaiting promises.

Instructions

Run a JavaScript expression inside the live game and return its value. Requires the plugin's Allow Eval parameter, a configured RMMZ_LIVE_TOKEN, and a running playtest. Anything the engine exposes works: $gameVariables.value(3), $gamePlayer._x, $gameSwitches.value(12). An expression that returns a promise is waited for and the settled value comes back, so one call can watch a frame counter, a transfer or a scene change instead of polling for it. The game gives a promise 20000ms to settle and the call waits for the same 20000ms by default, so a promise that needs 15s is answered, not cut off; raise timeoutMs to 60000 for a longer wait, but the plugin still abandons the promise itself at 20s. Two engine behaviors bite here, so they are worth knowing before a result looks wrong. Calling an API that moves the character directly ($gamePlayer.moveStraight(6)) reaches some of what a key does and not the rest: the party step count and the touch triggers happen inside the step itself, but the encounter counter only ticks in Game_Player.updateNonmoving, which is a frame or two later, so a fast scripted walk can outrun it — live_move holds the arrow instead and gets all of it. And $gamePlayer.performTransfer() run by hand rebuilds the map from the previous map's $dataMap, because loading the new file is Scene_Map's job: the player then stands "on" the new map with the old map's events running under them. reserveTransfer(...) and wait is the way.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoutMsNoHow long to wait (default 20000, the same ceiling the plugin gives a promise)
expressionYesA single expression; wrap statements in (() => { ... })()

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so: it documents the promise-settling model, the 20000ms plugin ceiling versus the timeoutMs wait, and two concrete engine pitfalls (encounter counter lag on scripted walk; performTransfer using the stale $dataMap). This is far beyond what the schema provides.

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?

Front-loaded with the one-line purpose, then prerequisites, then the timeout semantics, then the pitfalls. It is long, but for an eval tool the two engine-behavior paragraphs earn their place by preventing misread results; only minor phrasing ('the way') is loose.

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?

No output schema and no annotations, yet the description explains what comes back (the settled value of a promise), the timeout behavior, prerequisites, and the main failure modes. Nothing an agent needs to invoke this correctly is missing.

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 coverage is 100%, so the baseline is 3, but the description adds real meaning: it explains the 20000ms default and the 60000 ceiling for timeoutMs, and notes that the plugin still abandons the promise at 20s regardless. It also implies expression is a single expression, reinforcing the schema's IIFE guidance.

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 and resource: 'Run a JavaScript expression inside the live game and return its value.' This unambiguously distinguishes it from siblings like live_move, live_key, and assert_in_game, which act on the game rather than evaluating arbitrary expressions.

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?

Explicitly states prerequisites (Allow Eval parameter, RMMZ_LIVE_TOKEN, running playtest) and routes the agent to alternatives with conditions: use live_move instead of a scripted moveStraight, and reserveTransfer+wait instead of performTransfer. This is when-to-use and when-not guidance grounded in named alternatives.

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