answer
Settles the one popup, leader screen, or deal that question() shows by applying your chosen item, button, or accept/refuse response and returning the outcome or refusal.
Instructions
Answer what the game is asking: settle the one popup, leader screen or deal that question() shows, and nothing else. choice is the answers row's choice: an item's name (a TECH_, UNIT_, BUILDING_, POLICY_, PROMOTION_, BELIEF_ or goody name; liberate / annex / puppet / raze; a dig's choice number), a popup's or leader screen's button number, or on a leader screen accept / refuse (the deal on the table), leave (close it), accept_friendship. args carries the rest the popup needs (a promotion's unit_id, a dig's x and y, a stolen tech's player_id, a religion's beliefs and city). Dispatches on the gate: question() shows which question is up and hands back the rows to copy. It acts on the game as the popup's own button would -- an accepted deal, a razed city, a chosen tech cannot be taken back; a choice the popup does not offer, or an answer when nothing is asked, is refused with {ok: false, err, choices} and nothing happens. action_id: a retry with the same token replays the stored reply instead of answering twice. Not this tool: a decision with no popup up (research, production, a policy) is order; what a choice means is reference. Returns {ok, ...} with the popup's outcome and the gate that follows (still_pending and next when another leader waits; next also names the call that resumes the AIs' round when they are still moving), or the refusal.
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": {
"choice": "<choice>"
},
"name": "answer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | what the popup needs beyond the choice: unit_id, x and y, player_id, beliefs, city | |
| choice | Yes | the `answers` row's choice: an item name, a button number, or accept / refuse / leave / accept_friendship | |
| action_id | No | a token of my choosing: a retry with the same action_id replays the stored result |