Skip to main content
Glama

Add a shopkeeper with goods

make_shop
DestructiveIdempotent

Create a complete RPG Maker MZ shop event with keeper graphic, greeting, goods, and farewell; add a condition page for quest-gated shops.

Instructions

One call for a working shop: the keeper's graphic, a greeting, the goods, and a line for after the window closes. MZ stores a shop as command 302 carrying the first good in its own parameters plus one 605 line per further good, each [kind, id, priceType, price, purchaseOnly] with kind 0 item / 1 weapon / 2 armor and priceType 0 meaning the row's own price. MZ has no purchase branch, so the commands after the goods run when the window closes whatever the player did — this says so in the reply instead of inventing a hook that does not exist. Every good is checked first: the row must exist and must not be a blank slot, and a good with no price whose item price is 0 is reported, because that is a free item. when adds the page that replaces the locked one, which is how a shop that opens after a quest is built.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYes
yYes
nameNo
whenNoThe shop opens only once this holds; the keeper still greets you before that
goodsYesWhat is on the counter
imageNoDefault Actor2 index 1 facing up, which is the merchant sheet MZ ships
mapIdYes
deniedNoWhat the keeper says while the shop is still closed
replaceNo
speakerNo
faceNameNo
farewellNoSaid once the shop window closes
greetingNoA line, a list of lines, or {lines, speaker?, faceName?, faceIndex?, background?, positionType?}

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A4/5.0
Behavior5/5

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

Annotations declare idempotentHint=true and destructiveHint=true, and the description adds substantial behavioral context beyond them. It explains the underlying MZ command encoding (302/605), that commands after the goods run when the shop window closes regardless of purchase, the validation of each good, free-item reporting, and that `when` replaces the locked page. No annotation contradiction is present.

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

Conciseness3/5

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

The purpose is front-loaded, but the description is a dense, single paragraph mixing purpose, MZ implementation internals, and validation rules. Some details about command 302/605 are tangential to invocation, and the text could be more structured for a 13-parameter tool.

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?

Given 13 parameters, nested objects, and no output schema, the description covers the creation behavior, side effects, and key parameter semantics fairly well. However, it omits explanations for several optional parameters and does not describe what the tool returns, leaving some gaps for an agent to infer.

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

Parameters3/5

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

Schema description coverage is 46%, so the description must compensate. It explains the goods structure, validation rules, and `when` semantics, but leaves many parameters (name, replace, speaker, faceName, denied, image) largely unexplained. It also describes internal numeric kind/priceType values that do not match the schema's string enum, which may confuse rather than clarify.

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 states a specific composite creation action: it builds a working shop with keeper graphic, greeting, goods, and farewell line. It distinguishes itself from siblings like make_chest and make_npc by focusing on the shop event and its goods array. An agent can identify the tool's purpose without opening the schema.

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

Usage Guidelines3/5

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

The phrase 'One call for a working shop' implies the use case, and the explanation of `when` shows how to build conditional shops. However, there is no explicit when-to-use guidance versus alternatives such as make_npc or make_chest, and no exclusions or prerequisites are stated.

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