Skip to main content
Glama

Join two maps with doors

link_maps
DestructiveIdempotent

Create both ends of a door connection between RPG Maker MZ maps and validate landing cells so transfers don't strand players in walls.

Instructions

Write both ends of a connection in one call: a door event on each map that transfers the player to the other, with a graphic (!Door1, a tile, or nothing for an invisible exit), the door sound, the fade, and the direction they arrive facing. a and b are the doorway cells, and a player coming through one does not stop on it: they arrive at the first open cell beside the far door (above it, then right, left, below) facing away, and the reply's landed says which cell that was. Pass land on an end to choose it yourself — including the doorway cell itself, which is what the transfer onto the threshold used to do. A door walled in on all four sides has nowhere beside it, so it keeps the doorway and the answer carries a warning. The reason it exists is the check it does first: a player-touch door only fires when the player can stand on its cell, and a destination cell that is blocked means the player arrives stuck inside a wall with no way back — both of which a transferred playtest surfaces minutes later as 'nothing happens'. requires writes a locked pair of pages: page 0 refuses, page 1 (conditioned on the switch or item) does the transfer. twoWay: false leaves the far end alone — no door is written there, so its coordinates are the destination itself and nothing shifts. Both maps come back rendered.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYesOne end of the link
bYesThe other end
fadeNo0 none, 1 black (default), 2 white
soundNoSE played on the way through; default Door1, pass null for silence
twoWayNoDefault true: an event at each end, each leading to the other
graphicNoA sheet name (!Door1), {tileId: n}, or "none" for an invisible exit. Default !Door1
replaceNo
requiresNoGate both doors behind this condition. A condition is one of {switch: id, value?}, {selfSwitch: "A".."D", value?}, {variable: id, op?: "=="|">="|"<="|">"|"<"|"!=", value: n or {variable: id}} (op defaults to ">="), {item: id}, {weapon: id}, {armor: id}, {gold: n} (at least n), {actor: id, state?|skill?}, {button: "ok", pressed?}, or {code: 111, parameters: [...]} to write the engine's own shape.
directionNoWhich way the player faces on arrival; by default they face away from the door they came through, and 0 keeps the direction they were walking (the engine ignores a 0 and leaves the facing alone)
lockedMessageNoWhat the locked door says instead of transferring

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only say idempotent/destructive; the description adds the real behavioral payload: the landing algorithm (above, right, left, below, facing away), the `landed` reply field, the warning when a door is walled in on all four sides, the `requires` two-page locked structure, and that both maps are re-rendered. This is well beyond what the annotations convey.

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 core write, then descends into landing rules and rationale. Dense but every sentence carries information; the rationale paragraph is slightly long but earns its place by explaining the blocked-destination failure mode.

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?

With 10 parameters, nested objects, and no output schema, the description carries the return-value burden and does so by explaining the reply's `landed` field and warning behavior. Remaining gap is the undocumented `replace` parameter and the absence of any overwrite/destructive warning despite destructiveHint=true.

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 90%, so baseline is 3, but the description meaningfully extends it: `a`/`b` as doorway cells, `land` override including the doorway cell itself, `direction` arrival-facing, `sound`, `graphic`, and `twoWay` semantics. Only `replace` goes unexplained, which keeps it from 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?

Opens with a precise verb+resource+scope: 'Write both ends of a connection in one call: a door event on each map that transfers the player to the other.' An agent can distinguish this from place_event, set_event_page, or map_connectivity without opening any 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?

Explains the rationale for existing (the blocked-destination check that a live playtest surfaces late) and when to reach for `requires` (locked pairs) or `twoWay: false` (leave the far end alone). It gives clear context but never explicitly names an alternative sibling tool for the non-linked cases.

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