Skip to main content
Glama
Redseb
by Redseb

build_conditional_branch

Builds a conditional branch block (condition + then/else commands) for RPG Maker MZ event insertion, supporting switch, variable, gold, item, actor, and self-switch conditions.

Instructions

Build a Conditional Branch block (111 condition + then-branch + optional 411 Else + 412 closer, each branch terminated like the editor) for insertion via insert_event_commands. Condition types: switch, self_switch, variable, actor_in_party, gold, item. Provide thenBranch/elseBranch as EventCommand[] (e.g. from other builders). Read-only: returns { commands }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indentNoIndentation level of the block (default 0)
conditionYesConditional branch condition
elseBranchNoCommands for the Else branch; presence (even empty) adds the 411 Else block
thenBranchNoCommands to run when the condition is true (default empty)
Behavior4/5

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

With no annotations, the description takes on the full burden and states 'Read-only: returns { commands }', which informs the agent that this tool has no side effects. It also discloses the block composition and termination behavior, adding useful behavioral context beyond the schema.

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

Conciseness5/5

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

The description is a single dense paragraph that packs in the block structure, condition types, branch handling, insertion target, and read-only nature without any filler. Every sentence earns its place and key information is front-loaded.

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 the moderate complexity and rich schema, the description covers the essential usage pattern, return format, and side-effect profile. It could mention error cases or branch termination details more explicitly, but the provided text is sufficient for an agent to correctly select and invoke the tool.

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?

The schema covers all parameters with descriptions, so the baseline is 3. The description adds extra meaning by explaining that branches are EventCommand arrays and that the elseBranch presence adds the 411 block, and clarifies the return shape. This supplements the schema with builder-pattern context.

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 clearly states the tool builds a Conditional Branch block with specific command codes (111, 411, 412) and lists supported condition types. This distinguishes it from sibling builders like build_show_text or build_control_switch by naming the exact resource and structure.

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?

It explicitly says the output is for insertion via insert_event_commands, which is the intended usage context. It also tells users to provide branches as EventCommand[] from other builders, but it doesn't explicitly contrast with alternatives or state when not to use it. Still, the insertion target and branch construction guidance provide clear context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Redseb/rpgmaker-mz-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server