List your legal actions
legal_actionsEvery action available on your turn, each a JSON object to pass to act unchanged (types: choose_job, play, tactic, sensor_sweep, spy, overload, feed, buy, scrap, move, attack, bombard, raze, settle, undo, next_phase, end_turn; only the current phase's). A few entries need one value added: a move lists the tiles the ship can reach (send {"type": "move", "fleet": id, "x": x, "y": y} with one of them; with tiles_as_known: true, under fog of war, they're the tiles as you know them: space you can't see counts as open, so the move may stop short); a fleet card or scrap that fits several ships lists them in fleets (send it with "fleet": one of them); a Sensor Sweep (sensor_sweep, one per Sensor Outpost ready) needs x, y: any tile. Buys carry their name and cost (get_reference has what they do); a ship's buy lists the tiles it can launch on: add x, y to pick one, or leave them out for the first free one. When a tech is missing for want of research, you.next_tier says what the next costs. An attack, bombard or raze with x, y moves the piece there first and then acts, as the ship's one turn (its AP). With fleet, only that ship's orders.
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": {
"code": "<code>"
},
"name": "legal_actions"
}
}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. | |
| fleet | No | Only this ship's orders. -1 for every action. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |