Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOR_API_BASE_URLNo游戏 bridge 地址http://localhost:17127
LOR_MCP_TOOL_PROFILENo工具集(guided 加载战斗自动化 tools)guided

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
health_checkA

Check whether the Library of Ruina game Mod HTTP bridge is online and reachable.

get_game_stateA

Get the full current game state from the bridge.

Returns: navigation, progression, floors, inventory, availableStages, battle. Key fields for decision-making:

  • navigation.activeScene: Title | Main | Battle | Story

  • navigation.currentUIPhase: Sephiroth | Invitation | BattleSetting | BattleResult | ...

  • battle.phase: RoundStartPhase_UI | ApplyLibrarianCardPhase | RoundEndPhase | EndBattle | ...

  • battle.inBattle, battle.roundTurn

  • availableStages.stages[]: id, chapter, floorNum, stageType

get_state_layerA

Return a specific layer of the game state.

Valid layers: navigation, progression, floors, inventory, availablestages, battle

get_static_data_listA

List all available static game data files exported by StaticDataExport mod.

Returns file names and sizes for: cards, books, enemies, passives, decks, stages, etc.

get_game_data_itemA

Return a single item from a static game data collection.

First calls /static/{collection} to get the full collection, then finds the item by id. For efficiency, prefer get_game_data_items when you need multiple items.

Collections: cards, books, enemies, passives, decks, stages, drop_books, card_drop_tables, gifts, emotion_cards, emotion_ego, formations, quests, floor_levels, final_rewards, tooltips, titles, credits

get_game_data_itemsA

Return items from a static game data collection by comma-separated ids.

More efficient than calling get_game_data_item multiple times.

Example: get_game_data_items(collection='cards', item_ids='1,2,3')

actA

Execute a game action through the Mod HTTP bridge.

Available actions: navigate - navigate UI phase (params: phase=) selectSephirah - select a sephirah floor (params: sephirah=) getFloor - get floor data (params: sephirah=) startStage - start a stage/battle (params: stageId=) listMethods - list available methods on an object (params: objectType=) skipStory - skip current story endStory - end current story advanceStory - advance current story killAllEnemy - kill all enemy units autoPlay - auto-play current battle round endBattle - force-end current battle closeBattleScene - close the battle scene gameOver - trigger game over getStageInfo - get stage info (params: stageId=) clickBattleResult - click battle result button startBattle - start the battle phase callMethod - call an arbitrary method via reflection (params: objectType=, methodName=) getGameState - get game state info runStage - run a stage end-to-end (params: stageId=, optional: sephirah=)

When LOR_MCP_TOOL_PROFILE == 'guided', prefer the specific tools from tools.py. params: comma-separated key=value pairs, e.g. "stageId=3,sephirah=Malkuth" Commas inside [...] or {...} are preserved (not split on).

get_action_statusA

Check the status of deferred (async) actions.

Note: The /action-status endpoint may not be available in all mod versions. Returns completed action results and pending action IDs if supported.

get_battle_unitsA

Get detailed data for all current battle units (players + enemies).

Returns HP, break, speed dice, hand cards, emotion level for each unit. Only works during an active battle.

get_emotion_candidatesA

Get current emotion card candidates during RoundEndPhase.

Returns list of candidate cards with: index, id, name, state (Positive/Negative), emotionLevel, targetType. Returns {active: false} if emotion card UI is not currently shown.

The LLM should call this when battle.phase is RoundEndPhase and the phase seems stuck, then decide which card to pick.

get_stage_infoA

Get info about a specific stage by ID.

Returns stage controller state: wave, round, isEndContents.

start_gameA

Click Continue on the title screen and wait for the main UI.

The HTTP bridge may go down during scene transition; this tool retries until the scene is no longer Title.

navigateA

Navigate to a UI phase.

Valid phases: Sephirah, Librarian, Invitation, BattleSetting, Sepiroth, Story, Main_ItemList, Custom_CoreBook

start_battleA

Start a battle for the given stage with automatic book selection.

Flow: navigate Invitation -> prepareBattle (auto-selects best books by HP) -> wait for BattleSetting -> startBattle -> wait for Battle.

The LLM should call this after deciding which stage to play, then call battle_loop to auto-play the combat.

battle_loopA

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.

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}.

select_emotion_cardA

Select an emotion card by candidate index.

Call get_emotion_candidates first to see the options, then call this with the chosen index (0-based).

Handles SelectOne cards by auto-targeting the first alive player.

play_roundA

Play one battle round: stop dice -> auto-play cards -> confirm.

Waits for ApplyLibrarianCardPhase before acting. Use this for fine-grained control instead of battle_loop.

skip_storyB

Skip the current story/event scene.

click_battle_resultA

Click the battle result button after a battle ends.

close_battle_sceneA

Close the battle scene and return to the main UI.

list_methodsA

List available public methods on a game object type via reflection.

call_methodA

Call an arbitrary method on a game object via reflection.

For advanced debugging. args is a JSON array of typed arguments, e.g. '[{"type":"string","value":"6"}]'.

Common targets:

  • StageController: SkipRoundStartUI, StopSpeedDiceRoll, CompleteApplyingLibrarianCardPhase, KillAllEnemy

  • UIController: OnClickGameStart, PrepareBattle

kill_all_enemyA

Kill all enemy units (debug cheat). For testing only.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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