Take an action
actDo one action on your turn, given as one of the objects from legal_actions. Returns ok, error (why not, if it failed), log (what happened), turn and game_over, and hand_changed when cards left or joined your hand other than by being played. The player sees each move on their map, so it needs no explaining. {"type": "next_phase"} ends the fleet phase (locking ship orders and fleet cards) or the deploy phase (locking card plays); {"type": "end_turn"} (from the buy phase) hands the turn to the player: then call wait_for_turn at once (don't end your reply: the game only comes back to you through wait_for_turn).
To send a ship somewhere it can't reach this turn, use {"type": "move", "fleet": id, "x": x, "y": y, "toward": true}: it goes as far along the way as it can (around the black hole and systems), as its move for the turn. Add "keep": 1 to stop next to a system (to settle or raze it next turn), or "keep": 2 for a Carrier to strike from.
A ship's move can be split over several move orders in a turn (its move_tiles_left says what's left); entering a rival's zone of control ends it.
Under fog of war (The Divide) a move is also walked tile by tile. It stops short, keeping the rest of its move, when a gap, system or ship you hadn't seen is in its way, or a rival ship comes into sight within its attack range; entering a rival's zone of control ends its move. The log line says where it ended up, why it stopped, and the tiles of its move left; look again (get_state or legal_actions) before the next order. An attack, bombard or raze with x, y that stops short on the way makes no attack: its error says where the ship stopped and why.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>",
"code": "<code>"
},
"name": "act"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The game's code (like K7M-3XQ), from the player's message. If it names none, get one from new_game rather than asking them. | |
| action | Yes | One action object from legal_actions, unchanged (a move with x, y set to one of its tiles). |