Skip to main content
Glama
Redseb
by Redseb

build_troop_page

Create a troop battle-event page from a compact trigger object—conditions, commands, and run span—then land it with add_troop_page.

Instructions

Build a troop battle-event page { conditions, list, span } from a compact trigger — no hand-built 12-field conditions object. when keys (ANDed, at least one): turn [a, b] (turn a + bX; b 0 = only turn a), enemyHpBelow [enemyIndex, pct] (0-based troop slot, NOT enemy id), actorHpBelow [actorId, pct], switch id, turnEnd true. span: battle (runs once per battle, default), turn (once per turn), moment (re-runs while the condition holds — guard it with a switch). Timing (turn-based battles): an enemy action pattern with conditionType 1 / [a, b] is chosen during turn N's input phase (troop turnCount N-1, +1) and a troop page turn [a, b] is checked once turn N's action phase starts (turnCount N), so matching [a, b] land on the same battle turn N — the page runs before anyone acts; add turnEnd: true to run it after that turn resolves instead (the classic telegraph: warn at the end of the wind-up turn, strike next turn). Turn 0 = battle start. With b > 0 use span "turn", or a "battle" page fires only once. commands come from the build_ tools (build_show_text, build_battle_command, …); the end marker is appended. Read-only: returns { page } — land it with add_troop_page (or create_troop/update_troop pages).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spanNoHow often the page may run (default battle)
whenYesTrigger; every key given is ANDed, at least one required
commandsNoThe page's event commands (e.g. from build_* tools); default empty

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.4.0

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden and does so thoroughly: declares the tool read-only, specifies the return shape ({ page }), notes the end marker is appended, and explains timing semantics (turn 0 = battle start, page runs before actors act, turnEnd defers to after resolution). This is unusually rich behavioral disclosure for a builder tool.

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-loads purpose and packs essential rules efficiently, with no obvious filler. The single dense paragraph, however, makes it harder to scan for specific guidance (span vs turnEnd vs landing) than a structured layout would; given the inherent complexity, it is acceptable but not optimal.

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?

For a complex tool with nested trigger objects and no output schema, the description supplies everything an agent needs: trigger semantics, span timing rules, return shape, landing instructions, and command sourcing. No critical gap remains.

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 100%, so baseline is 3. The description adds meaningful cross-parameter context beyond the schema, especially for span ('moment' re-runs while condition holds – guard it with a switch) and the interaction between turn ranges and enemy action patterns. However, much of the per-key trigger explanation overlaps what the schema already states (e.g., enemyHpBelow 0-based troop slot), so it does not fully transcend redundancy.

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 (Build) and resource (troop battle-event page) and immediately distinguishes from the hand-built alternative. Names the landing tools (add_troop_page, create_troop/update_troop pages), so an agent can tell exactly where this fits among siblings.

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?

Gives explicit when-to-use guidance: span selection rules (b > 0 requires 'turn' or a battle page fires once), turnEnd usage with a concrete telegraph example, and the routing to add_troop_page for landing the result. It also states that commands must come from build_* tools. This is near-complete operational guidance.

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

Deploy Server

Other Tools