Skip to main content
Glama

battle_loop

Automatically complete a battle from start to finish, handling dice, card placement, emotion selection, and stuck detection. Returns victory, timeout, or not_in_battle status.

Instructions

Auto-play through an entire battle until it ends.

Handles: round-start dice, auto card placement, emotion card selection, phase stuck detection, and story skips (including BattleStoryPhase in suppression battles).

Emotion card strategy: calls get_emotion_candidates, picks the Positive card with highest emotionLevel. For smarter selection, the LLM can interrupt and call select_emotion_card manually.

Returns {"result": "victory"|"timeout"|"not_in_battle", "rounds": N}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_roundsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the full burden. It discloses handling of multiple phases, stuck detection, and story skips. However, it lacks details on prerequisites (e.g., must be in a battle) or side effects like resource consumption.

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?

The description is relatively concise, with a clear front-loaded purpose and bullet-pointed details. Each sentence adds value. It could be slightly more structured, but it avoids verbosity.

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 complexity of auto-battle, the description covers key aspects like emotion card strategy, phase handling, and return values. It could mention limitations (e.g., battle types not supported) but is otherwise comprehensive.

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

Parameters2/5

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

The only parameter 'max_rounds' (default 60) has 0% schema description coverage, and the description does not explain its purpose or impact. The parameter is self-explanatory but the description should add meaning, especially given the lack of schema descriptions.

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 auto-plays an entire battle until it ends, listing specific phases handled (round-start dice, auto card placement, etc.). It distinguishes itself from siblings like 'play_round' which only plays a single round, and 'start_battle' which initiates but doesn't auto-play.

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?

The description mentions that for smarter emotion card selection, the LLM can interrupt and call 'select_emotion_card' manually, providing a clear use case. However, it does not explicitly state when not to use this tool or contrast it with alternatives like 'play_round'.

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/hongyue0721/lorAI-mcp'

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