| get_game_overviewA | Get a high-level summary of the current game state. Returns turn number, civilization, yields (gold/science/culture/faith),
current research and civic, and counts of cities and units.
Call this first to orient yourself. |
| get_unitsA | List all your units with position, type, movement, and health. Each unit shows its id and idx (needed for action commands).
Consumed units (e.g. settlers that founded cities) are excluded. |
| get_spiesA | List all your spy units with position, rank, city, and available missions. Shows each spy's composite id (needed for spy_action), current location,
rank (Recruit/Agent/Special Agent/Senior Agent), XP, and which operations
are available at their current position.
Note: offensive missions only become available once the spy has physically
arrived in the target city. Use spy_action with action='travel' first.
|
| spy_actionA | Send a spy to a city or launch a spy mission. Args:
unit_id: The spy's composite ID (from get_spies output)
action: 'travel' to move spy to a city, or a mission type to launch a mission.
Mission types: COUNTERSPY, GAIN_SOURCES, SIPHON_FUNDS, STEAL_TECH_BOOST,
SABOTAGE_PRODUCTION, GREAT_WORK_HEIST, RECRUIT_PARTISANS,
NEUTRALIZE_GOVERNOR, FABRICATE_SCANDAL
target_x: X coordinate of the target city tile
target_y: Y coordinate of the target city tile
Travel notes:
- Valid targets: your own cities and city-states only.
- Allied civ cities are NOT valid travel targets.
- Travel is queued end-of-turn; spy position updates after turn ends.
Mission notes:
- Spy must be physically IN the target city to launch any offensive mission.
- Use 'travel' first, then end the turn, then launch the mission.
- COUNTERSPY defends your own city (spy must be in your city).
- get_spies shows which ops are available at the spy's current location.
|
| get_citiesA | List all your cities with yields, population, production, growth, and loyalty. Each city shows its id (needed for production commands).
Cities losing loyalty show warnings with flip timers. |
| get_city_productionA | List what a city can produce right now. Args:
city_id: City ID (from get_cities output)
Returns available units, buildings, and districts with production costs.
Call this when a city finishes building or to decide what to produce next.
|
| get_map_areaA | Get terrain info for tiles around a point. Args:
center_x: X coordinate of center tile
center_y: Y coordinate of center tile
radius: How many tiles out from center (default 2, max 4)
|
| get_settle_advisorA | List best settle locations near a settler unit. Args:
unit_id: The settler's composite ID (from get_units output)
Scores locations by yields, water, defense, and resource value.
Returns top 5 candidates sorted by score.
|
| get_pathing_estimateA | Estimate how many turns a unit needs to reach a destination. Args:
unit_id: The unit's composite ID (from get_units output)
target_x: Destination X coordinate
target_y: Destination Y coordinate
Returns estimated turns, path length, and reachable tiles this turn.
|
| get_global_settle_advisorA | Find the best settle locations across the entire revealed map. Unlike get_settle_advisor (which searches near a specific settler),
this scans all revealed land for the top 10 settle candidates.
Use this when deciding WHERE to send a settler, not just where to settle.
|
| get_builder_tasksA | Get a prioritized task board for all your builders. Scans your territory for tiles needing improvements and matches them
with idle builders. Like the builder lens in the UI — shows what to
build where and which builder is closest.
Priority tiers:
- URGENT: Pillaged improvements (yield loss), unimproved strategic resources
- HIGH: Unimproved luxury/bonus resources
- NORMAL: Empty tiles that could benefit from farms/mines/lumber mills
Call this before issuing builder orders each turn.
|
| get_empire_resourcesA | Get a summary of all resources in and near your empire. Shows owned resources (improved/unimproved) grouped by type,
and unclaimed resources near your cities. |
| get_strategic_mapA | Get fog-of-war boundaries and unclaimed resources across the map. Shows how far explored territory extends from each city (in 6 directions),
highlighting directions that need exploration. Also lists unclaimed luxury
and strategic resources on revealed but unowned land. |
| get_diplomacyA | Get diplomatic status with all known civilizations. Shows diplomatic state (Friendly/Neutral/Unfriendly), relationship modifiers
with scores and reasons, grievances, delegations/embassies, and available
diplomatic actions you can take. Also shows visible enemy city details
(name, population, loyalty, walls). |
| get_tech_civicsA | Get technology and civic research status. Shows current research, current civic, turns remaining,
and lists of available technologies and civics to choose from. |
| get_pending_tradesA | Check for pending trade deal offers from other civilizations. Shows what each civ is offering and what they want in return.
Use respond_to_trade to accept or reject.
|
| get_policiesA | Get current government, policy slots, and available policies. Shows current government type, each policy slot with its type and current
policy (if any), and all unlocked policies grouped by compatible slot type.
Wildcard slots accept any policy type. |
| get_notificationsA | Get all active game notifications. Shows action-required items (need your decision) and informational
notifications. Action-required items include which MCP tool to use
to resolve them. Call this to check what needs attention without
ending the turn. |
| get_pending_diplomacyA | Check for pending diplomacy encounters (e.g. first meeting with a civ). Diplomacy encounters block turn progression. Call this if end_turn
reports the turn didn't advance. Returns any open sessions with their
dialogue text, visible buttons, and response guidance.
|
| get_governorsA | Get governor status, appointed governors, and available types. Shows governor points, currently appointed governors with assignments,
and governors available to appoint. Use appoint_governor to appoint one.
|
| appoint_governorA | Appoint a new governor. Args:
governor_type: e.g. GOVERNOR_THE_EDUCATOR (Pingala), GOVERNOR_THE_DEFENDER (Victor)
Requires available governor points. Use get_governors to see options.
|
| assign_governorA | Assign an appointed governor to a city. Args:
governor_type: The governor type (from get_governors output)
city_id: The city ID (from get_cities output)
Governor must already be appointed. Takes several turns to establish.
|
| promote_governorB | Promote a governor with a new ability. Args:
governor_type: The governor type (from get_governors output)
promotion_type: The promotion type (from get_governors output, shown under each governor)
Requires available governor points. Use get_governors to see available promotions.
|
| get_unit_promotionsA | List available promotions for a unit. Args:
unit_id: The unit's composite ID (from get_units output)
Shows promotions filtered by the unit's promotion class.
Only units with enough XP will have promotions available.
|
| promote_unitA | Apply a promotion to a unit. Args:
unit_id: The unit's composite ID (from get_units output)
promotion_type: e.g. PROMOTION_BATTLECRY, PROMOTION_TORTOISE
Use get_unit_promotions first to see available options.
|
| get_city_statesA | List known city-states with envoy counts and types. Shows envoy tokens available, each city-state's type (Scientific,
Industrial, etc.), how many envoys you've sent, and who is suzerain.
Use send_envoy to send an envoy.
|
| send_envoyA | Send an envoy to a city-state. Args:
player_id: The city-state's player ID (from get_city_states)
Requires available envoy tokens. Use get_city_states to see options.
|
| get_pantheon_beliefsA | Get pantheon status and available beliefs for selection. Shows current pantheon (if any), faith balance, and all available
pantheon beliefs with their bonuses. Use choose_pantheon to found one.
|
| choose_pantheonA | Found a pantheon with the specified belief. Args:
belief_type: e.g. BELIEF_GOD_OF_THE_FORGE, BELIEF_DIVINE_SPARK
Use get_pantheon_beliefs first to see options. Requires enough faith
and no existing pantheon.
|
| get_religion_beliefsA | Get religion founding status, available religions, and available beliefs. Shows whether you've founded a religion, available religion types to choose,
and beliefs grouped by class (Follower, Founder, Enhancer, Worship).
Use found_religion to found a religion after your Great Prophet activates.
|
| found_religionB | Found a religion with a chosen name, follower belief, and founder belief. Args:
religion_type: e.g. RELIGION_HINDUISM, RELIGION_BUDDHISM, RELIGION_ISLAM
follower_belief: e.g. BELIEF_WORK_ETHIC, BELIEF_CHORAL_MUSIC
founder_belief: e.g. BELIEF_STEWARDSHIP, BELIEF_CHURCH_PROPERTY
Requires your Great Prophet to have already activated on a Holy Site
(via UNITOPERATION_FOUND_RELIGION). Use get_religion_beliefs
first to see available options.
|
| upgrade_unitA | Upgrade a unit to its next type (e.g. Slinger -> Archer). Args:
unit_id: The unit's composite ID (from get_units output)
Requires the right technology, enough gold, and the unit must have
moves remaining. The unit's movement is consumed by upgrading.
|
| get_dedicationsA | Get current era age, available dedications, and active ones. Shows era score thresholds, whether you're in a Golden/Dark/Normal age,
and lists available dedication choices with their bonuses.
Use choose_dedication to select one when required.
|
| choose_dedicationA | Choose a dedication/commemoration for the current era. Args:
dedication_index: The index of the dedication (from get_dedications output)
Use get_dedications first to see available options and their bonuses.
|
| get_trade_optionsA | See what both sides can trade — like opening the trade screen. Args:
other_player_id: The player ID (from get_diplomacy output)
Shows gold, resources, favor, open borders status, and alliance eligibility
for both you and the other civilization. Use before propose_trade to see
what's available.
|
| respond_to_tradeA | Accept or reject a pending trade deal. Args:
other_player_id: The player ID of the civilization (from get_pending_trades)
accept: True to accept the deal, False to reject it
force: Override the pre-war gate when accepting a joint-war invitation
force_reason: One sentence on WHY you are overriding. Recorded to
data/force_log.jsonl. Without it a post-game review cannot tell
a wrong gate from a wrong call — write it even when in a hurry.
(NO_SIEGE_VS_WALLS — accepting joint war = declaring war on the
target immediately)
Use get_pending_trades first to see what's being offered.
|
| propose_tradeA | Propose a trade deal to another civilization. Args:
other_player_id: The player ID (from get_diplomacy output)
offer_gold: Lump sum gold to give them
offer_gold_per_turn: Gold per turn to give them (30-turn duration)
offer_resources: Comma-separated resource types to offer, e.g. "RESOURCE_SILK,RESOURCE_TEA"
offer_favor: Diplomatic favor to offer
offer_open_borders: True to offer our open borders
request_gold: Lump sum gold to request from them
request_gold_per_turn: Gold per turn to request (30-turn duration)
request_resources: Comma-separated resource types to request
request_favor: Diplomatic favor to request from them
request_open_borders: True to request their open borders
request_cities: Comma-separated city IDs to demand from them (get them from
get_diplomacy / run_lua; a losing AI will cede cities to end a war)
offer_cities: Comma-separated city IDs of ours to hand over
make_peace: True to include a peace treaty. Required when at war — the
ceasefire is what you are paying with, and demanding cities for it is
the whole point of a war-ending deal.
joint_war_target: Player ID of a third civ to declare joint war against
mode: "send" to commit the deal, "test" to preview AI's counter-offer without committing
force: Override the pre-war gate for joint wars (NO_SIEGE_VS_WALLS —
force_reason: One sentence on WHY you are overriding. Recorded to
data/force_log.jsonl. Without it a post-game review cannot tell
a wrong gate from a wrong call — write it even when in a hurry.
same rule as send_diplomatic_action war declarations)
Examples: Gift 100 gold: offer_gold=100. Trade silk for 3 gpt: offer_resources="RESOURCE_SILK", request_gold_per_turn=3.
Mutual open borders: offer_open_borders=True, request_open_borders=True.
Test a deal first: mode="test" to see what the AI thinks is fair, then mode="send" to commit.
Ending a war on your terms: make_peace=True plus request_cities/request_resources.
Always run mode="test" first — the AI's willingness to cede a city swings hard with
war score, and the test call shows what it considers fair without committing.
|
| propose_peaceA | Propose white peace to a civilization you're at war with. Args:
other_player_id: The player ID (from get_diplomacy output)
Requires being at war and past the 10-turn war cooldown.
The AI may accept or reject based on war score and relationship.
|
| set_policiesA | Set policy cards in government slots. Args:
assignments: Comma-separated slot assignments, e.g.
"0=POLICY_AGOGE,1=POLICY_URBAN_PLANNING"
Slots not listed keep their current policy. Use NONE to
explicitly clear a slot (e.g. "2=NONE"). Use get_policies to
see available policies and slot indices.
Wildcard slots can accept any policy type. Military slots accept
military policies, economic slots accept economic policies, etc.
|
| respond_to_diplomacyA | Respond to a pending diplomacy encounter. Args:
other_player_id: The player ID of the other civilization (from get_pending_diplomacy)
response: "POSITIVE" (friendly) or "NEGATIVE" (dismissive)
First meetings typically have 2-3 rounds. The tool automatically detects
and closes goodbye-phase sessions (where dialogue text stops changing).
If SESSION_CONTINUES is returned, send another response for the next round.
|
| send_diplomatic_actionA | Send a proactive diplomatic action to another civilization. Args:
other_player_id: The player ID (from get_diplomacy output)
action: One of: DIPLOMATIC_DELEGATION, DECLARE_FRIENDSHIP, DENOUNCE,
RESIDENT_EMBASSY, OPEN_BORDERS,
DECLARE_SURPRISE_WAR, DECLARE_FORMAL_WAR, DECLARE_HOLY_WAR,
DECLARE_LIBERATION_WAR, DECLARE_RECONQUEST_WAR,
DECLARE_PROTECTORATE_WAR, DECLARE_COLONIAL_WAR,
DECLARE_TERRITORIAL_WAR
force: Override the pre-war gate (NO_SIEGE_VS_WALLS). War declarations
force_reason: One sentence on WHY you are overriding. Recorded to
data/force_log.jsonl. Without it a post-game review cannot tell
a wrong gate from a wrong call — write it even when in a hurry.
against a civ with visible walled cities are blocked while you
have no wall-breaker units (siege class, battering ram/siege
tower, or ranged strength >= 60).
Delegations cost 25 gold and can be rejected if the civ dislikes you.
Embassies require Writing tech. Use get_diplomacy to see available actions.
Surprise war is always available if not allied/friends. Other war types
(casus belli) require specific civics and conditions.
|
| form_allianceA | Form an alliance with another civilization. Args:
other_player_id: The player ID (from get_diplomacy output)
alliance_type: One of: MILITARY, RESEARCH, CULTURAL, ECONOMIC, RELIGIOUS
Requires declared friendship and Diplomatic Service civic.
Use get_trade_options to check alliance eligibility first.
|
| city_actionA | Issue a command to a city. Args:
city_id: City ID (from get_cities output)
action: Currently supported: 'attack' (city ranged attack)
target_x: Target X coordinate (required for attack)
target_y: Target Y coordinate (required for attack)
For attack: city must have walls and not have fired this turn.
Range is 2 tiles from city center.
For captured/disloyal city decisions (city_id is ignored, uses pending city):
- 'keep': Keep the city (works for both captured and loyalty-flipped cities)
- 'reject': Reject/free a disloyal city (loyalty flip only)
- 'raze': Raze a captured city (military conquest only)
- 'liberate_founder': Liberate to original founder
- 'liberate_previous': Liberate to previous owner
|
| unit_actionA | Issue a command to a unit. Args:
unit_id: The unit's composite ID (from get_units output)
force: Override a safety block. Only set this after reading the
block's explanation and deciding the risk is worth it — the
safety checks exist because these mistakes cost whole games
(civilians walking into barbarians, ranged units moving before
they shoot). Leave it False by default.
force_reason: One sentence on WHY you are overriding. Recorded to
data/force_log.jsonl. Without it a post-game review cannot tell
a wrong gate from a wrong call — write it even when in a hurry.
action: One of: move, attack, fortify, skip, found_city, improve, repair, remove_improvement, remove_feature, build_route, automate, heal, alert, sleep, delete, trade_route, activate, sacrifice_charges, hurry_production, hurry_wonder, hurry_district, teleport, spread_religion, excavate, form_corps, form_army, rebase
target_x: Target X coordinate (required for move/attack/trade_route/teleport/rebase)
target_y: Target Y coordinate (required for move/attack/trade_route/teleport/rebase)
improvement: Improvement type for builders (required for improve), e.g.
IMPROVEMENT_FARM, IMPROVEMENT_MINE, IMPROVEMENT_QUARRY,
IMPROVEMENT_PLANTATION, IMPROVEMENT_CAMP, IMPROVEMENT_PASTURE,
IMPROVEMENT_FISHING_BOATS, IMPROVEMENT_LUMBER_MILL
For move/attack: provide target_x and target_y.
For trade_route: provide target_x and target_y of destination city.
For teleport: provide target_x and target_y of destination city. Traders only, must be idle (not on active route).
For rebase: provide target_x/target_y of a friendly aerodrome or carrier. Air units only —
they never use move (they don't walk the map), and anything past their 15-tile strike
range can only be reached by rebasing. Long hops may be refused; go via an intermediate
aerodrome (measured: 44 tiles rejected, 20 accepted).
For improve: provide improvement name. Builder must be on the tile.
For repair: repairs a pillaged improvement on the builder's current tile. No improvement name needed.
For remove_improvement: demolishes an intact improvement on the builder's current tile (e.g. to replace a farm with a mine). Costs one charge.
For activate: activates a Great Person on their matching district.
For sacrifice_charges: Royal Society builder sacrifice — spends ALL builder charges to boost a district project (2% of cost per charge). Builder must be on the district tile. Expansion-only; absent in RULESET_STANDARD.
For hurry_production: spends builder charges to hurry construction on the builder's current tile, auto-detecting which variant this civ has. hurry_wonder forces the wonder variant (Qin Shi Huang / FIRST_EMPEROR_TRAIT, early eras only), hurry_district forces the district variant (Aztec). Move the builder onto the in-progress wonder/district tile first. If your leader lacks the ability the error says so explicitly — it is a ruleset limit, not a tool failure.
For form_corps / form_army: merges the SAME-TYPE unit at target_x/target_y into this
one. Corps (+10 combat strength) needs Nationalism; Army (+17) needs Mobilization —
these are the two free power spikes on the civics tree, and the same standing army
gains roughly an era's worth of strength by merging. Both units must be the same
unit type; move them together first.
For spread_religion: spreads religion at current tile. Missionaries/Apostles only.
For build_route: builds road/railroad on current tile. Military Engineers only. No charges used; costs 1 Iron + 1 Coal per railroad tile.
For fortify/skip/found_city/automate/heal/alert/sleep/delete: no target needed.
heal = fortify until healed (auto-wake at full HP).
alert = sleep but auto-wake when enemy enters sight range.
delete = permanently disband the unit.
|
| fill_idle_productionA | Give every idle city something to build, in one call. Walks all your cities, finds the ones producing nothing, and starts the first
basic building each one can actually make (monument → granary → water mill →
sewer → builder as a fallback).
Why this exists: idle production is not banked, it evaporates that turn. At 20
cities that is an annoyance; at 90+ the end_turn gate names a dozen idle cities
per turn and the per-city set_city_production tool would need a dozen round
trips to clear it. The choice itself carries no strategic content — cities that
need a real decision (spaceport city, front-line production) are never idle in
the first place, so this never touches them.
Returns a per-city list of what was started, plus any city with nothing
buildable at all (those need manual handling).
|
| skip_remaining_unitsA | Skip all units that still have moves remaining. Useful after diplomacy encounters invalidate all standing orders.
Uses GameCore FinishMoves on each unit — fast, reliable, no async issues. |
| set_city_productionA | Set what a city should produce. Args:
city_id: City ID (from get_cities output)
item_type: UNIT, BUILDING, DISTRICT, or PROJECT
item_name: e.g. UNIT_WARRIOR, BUILDING_MONUMENT, DISTRICT_CAMPUS, PROJECT_LAUNCH_EARTH_SATELLITE
target_x: X coordinate for district/wonder placement (required for districts — use get_district_advisor to find best tile)
target_y: Y coordinate for district/wonder placement
force: Override a RED-alert block on civilian production. Only use
after reading the block's explanation — it fires when producing
a settler/builder while hostiles are at the gates.
force_reason: One sentence on WHY you are overriding. Recorded to
data/force_log.jsonl. Without it a post-game review cannot tell
a wrong gate from a wrong call — write it even when in a hurry.
Tip: call get_cities first to see your cities and their IDs.
|
| purchase_itemA | Purchase a unit or building instantly with gold or faith. Args:
city_id: City ID (from get_cities output)
item_type: UNIT or BUILDING
item_name: e.g. UNIT_WARRIOR, BUILDING_MONUMENT
yield_type: YIELD_GOLD (default) or YIELD_FAITH
force: Override the upkeep gate (UPKEEP_CEILING). Buying a unit is
force_reason: One sentence on WHY you are overriding. Recorded to
data/force_log.jsonl. Without it a post-game review cannot tell
a wrong gate from a wrong call — write it even when in a hurry.
blocked when it would push military upkeep past 60% of gross
income — the purchase feels free, the bill arrives next turn.
Costs gold/faith immediately. Use get_city_production to see what's available.
|
| set_researchA | Choose a technology or civic to research. Args:
tech_or_civic: The type name, e.g. TECH_POTTERY or CIVIC_CRAFTSMANSHIP
category: "tech" or "civic" (default: tech)
Tip: call get_tech_civics first to see available options.
|
| set_research_queueA | Plan a research route once — end_turn auto-advances it on completion. Args:
items: Comma-separated type names in order, e.g.
"TECH_NUCLEAR_FISSION,TECH_LASERS,TECH_NUCLEAR_FUSION".
Empty string shows the current queues without changing them.
"clear" empties the queue for the given category.
category: "tech" or "civic" (default: tech)
The queue is a fallback, not a lock: it is only consumed when the
current research/civic slot is EMPTY at end_turn time, so a manual
set_research always wins. A queue item the engine rejects pauses the
queue with a visible event. Persisted per game — survives restarts.
|
| set_production_queueA | Plan a city's build order once — end_turn auto-advances it when the
city's production slot is empty (defect 65: cities idling on
"Building: nothing" for turns after every completion). Args:
city_id: City ID (from get_cities output)
items: Comma-separated item names in order. item_type is inferred
from the prefix (BUILDING_/UNIT_/DISTRICT_/PROJECT_).
Districts MUST carry placement coords inline:
"DISTRICT_CAMPUS@69,47" (use get_district_advisor first).
**Wonders need coords too** — they are BUILDING_ items but
are placed on a tile like districts:
"BUILDING_FORBIDDEN_CITY@67,49" (use get_wonder_advisor).
A wonder queued without coords cannot be rejected here (the
prefix doesn't say which buildings are wonders) and fails at
consumption time instead — 2026-08-11 T269 cost Ostia a whole
idle turn that way.
Example: "BUILDING_MARKET,UNIT_TRADER,DISTRICT_CAMPUS@69,47"
Empty string shows this city's current queue.
"clear" empties this city's queue.
The queue is a fallback, not a lock: a manual set_city_production always
wins; consumption happens only when the slot is empty at end_turn time.
A rejected item pauses the queue with a visible event — this includes
the RED-alert civilian-production gate, which still applies at
consumption time. Persisted per game — survives restarts.
|
| set_victory_goalA | Lock in the victory path for this game. Do this once, early. After locking, every turn's briefing shows the goal, and deterministic
deviation checks will call out actions that drift from it (e.g. building
armies while pursuing a science victory with no threats around).
Args:
victory_type: SCIENCE, CULTURE, RELIGION, or DOMINATION
reason: Why this path fits this civ/map (shown in briefings)
|
| plan_addA | Add a step to the plan chain. Steps auto-activate when their
prerequisite completes — you don't need to remember what comes next;
the briefing shows it every turn. Completion is judged by SERVER-SIDE facts, not by your say-so:
cond="cities_at_least" args="2" (city count reaches 2)
cond="military_at_least" args="3" (military unit count)
cond="camp_destroyed" args="9,33" (that camp confirmed gone)
cond="exploration_at_least" args="0.15" (map revealed fraction)
cond="tech_completed" args="TECH_ARCHERY"
cond="manual" (you mark it via plan_done)
Args:
goal: Short Chinese description, e.g. "拆除营地(9,33)"
cond: Completion condition type (see above)
args: Condition argument
after: Plan id that must complete first (-1 = starts active now)
|
| plan_listA | List the full plan chain with status (active / pending / done). |
| plan_doneA | Mark a manual-condition plan as completed. Plans with server-checked
conditions complete automatically — this is only for cond="manual". |
| plan_dropB | Remove a plan that no longer makes sense (situation changed). |
| end_turnA | End the current turn. Make sure you've moved all units, set production, and chosen research
before ending the turn.
All 5 reflection parameters are required and must be non-empty.
These form the per-turn diary — your persistent memory across sessions:
tactical: What happened this turn — combat, movements, improvements.
strategic: Current standing vs rivals — yields, city count, victory path.
tooling: Tool issues or observations. Write "No issues" if none.
planning: Concrete actions for the next 5-10 turns.
hypothesis: Predictions — enemy behavior, resource needs, timelines.
IMPORTANT: Reflections are recorded BEFORE the AI processes its turn.
Anything that surfaces after end_turn (diplomacy proposals, AI movements,
events reported in the turn result) belongs in the NEXT turn's diary.
If end_turn is blocked and you call it again after resolving the blocker,
the diary entry from the first call is kept — do not repeat reflections.
|
| get_diaryA | Read diary entries for game memory. Args:
last_n: Number of most recent entries to return (default 5, max 50).
Used when turn/from_turn/to_turn are not specified.
turn: Return the single entry for this turn number.
from_turn: Return entries from this turn onward (inclusive).
to_turn: Return entries up to this turn (inclusive).
Auto-detects the current game from the live connection. Each game has
its own diary file (keyed by civ + random seed).
Call this at the start of a session or after context compaction to
restore strategic memory from previous turns.
|
| get_trade_routesA | Get trade route capacity, active routes, and trader status. Shows how many routes are active vs capacity, and lists all trader
units with their positions and whether they're idle or on a route. |
| get_trade_destinationsA | List valid trade route destinations for a trader unit. Args:
unit_id: The trader's composite ID (from get_units output)
Shows domestic and international destinations. Use unit_action
with action='trade_route' and target_x/target_y to start a route.
|
| get_district_advisorA | Show best tiles to place a district with adjacency bonuses. Args:
city_id: City ID (from get_cities)
district_type: e.g. DISTRICT_CAMPUS, DISTRICT_HOLY_SITE, DISTRICT_INDUSTRIAL_ZONE
Returns valid placement tiles ranked by adjacency bonus.
Use set_city_production with target_x/target_y to build the district.
|
| get_wonder_advisorA | Show best tiles to place a wonder with displacement cost analysis. Args:
city_id: City ID (from get_cities output)
wonder_name: Wonder building type, e.g. BUILDING_CHICHEN_ITZA, BUILDING_ORSZAGHAZ
Returns valid placement tiles ranked by displacement cost (lowest = best):
tiles with no improvements or resources are preferred over productive tiles.
Also shows terrain, feature, river/coastal status, and any resources/improvements
that would be removed by placing the wonder there.
Use set_city_production with target_x/target_y to build the wonder.
|
| get_purchasable_tilesA | List tiles a city can purchase with gold. Args:
city_id: City ID (from get_cities)
Shows cost, terrain, and resources for each purchasable tile.
Tiles with luxury/strategic resources are listed first.
|
| purchase_tileA | Buy a tile for a city with gold. Args:
city_id: City ID
x: Tile X coordinate (target_x also accepted — unit_action 系工具用
target_x/target_y,这里收编别名免得同族参数名不一致再咬人)
y: Tile Y coordinate (target_y also accepted)
Use get_purchasable_tiles first to see costs and options.
|
| change_governmentA | Switch to a different government type. Args:
government_type: e.g. GOVERNMENT_CLASSICAL_REPUBLIC, GOVERNMENT_OLIGARCHY
Use get_policies to see current government. First switch after
unlocking a new tier is free (no anarchy).
|
| get_great_peopleA | See available Great People and recruitment progress. Shows which Great People are available, their recruitment cost,
and which civilization (if any) is recruiting them. |
| get_gp_advisorA | Show best cities to activate a Great Person, ranked by suitability. Args:
unit_index: The Great Person unit's index (from get_units output).
Lists all cities with the matching district (e.g., campuses for Great Scientists),
showing which ones the GP can activate on, distance, city yield, and great work
slot availability for cultural GPs.
|
| recruit_great_personA | Recruit a Great Person using accumulated GP points. Args:
individual_id: The individual's ID (from get_great_people output, shown after ability)
Requires enough Great Person points for that class.
The GP spawns in your capital. Use get_great_people to check [CAN RECRUIT] status.
|
| patronize_great_personA | Buy a Great Person instantly with gold or faith. Args:
individual_id: The individual's ID (from get_great_people output)
yield_type: YIELD_GOLD (default) or YIELD_FAITH
currency: alias for yield_type — accepts "gold"/"faith" (overrides
yield_type when set)
Costs shown in get_great_people output under "Patronize:".
Requires enough gold/faith to cover the cost.
|
| reject_great_personA | Pass on a Great Person (skip to the next one in that class). Args:
individual_id: The individual's ID (from get_great_people output)
Costs faith. The next Great Person in that class becomes available.
Use when you don't want the current GP and want to save points for a better one.
|
| get_world_congressA | Get World Congress status, active resolutions, and voting options. Shows whether congress is in session, resolutions to vote on (with options A/B
and possible targets), turns until next session, and your diplomatic favor.
When in session, use queue_wc_votes to register votes before end_turn.
|
| queue_wc_votesA | Pre-configure World Congress votes for the upcoming session. Args:
votes: JSON array of vote objects, e.g.
'[{"hash": -513644209, "option": 1, "target": 2, "votes": 5}]'
hash = resolution type hash (from get_world_congress)
option = 1 for A, 2 for B
target = player ID for PlayerType resolutions (from get_world_congress
target list, e.g. [target=2] Portugal), or target value for
non-player resolutions. The handler resolves to the correct
0-based index at runtime.
votes = max votes to allocate (will use as many as favor allows)
Call this BEFORE end_turn when get_world_congress shows 0 turns until next
session. Registers an event handler that fires during WC processing and
casts your votes with the specified preferences.
If you don't call this, end_turn will pause at the World Congress session
and return control to you for interactive voting.
|
| get_victory_progressA | Get victory condition progress for all civilizations. Shows progress toward Science, Domination, Culture, Religious,
Diplomatic, and Score victories. Includes space race VP, diplomatic VP,
tourism vs domestic tourists, religion spread, capital ownership,
and military strength. Call every 20-30 turns to track the race. |
| get_religion_spreadA | Get per-city religion breakdown across all visible cities. Shows which religion is majority in each city, follower counts,
and which religions are closest to religious victory. |
| set_city_focusA | Set a city's citizen yield priority. Args:
city_id: City ID
focus: One of: food, production, gold, science, culture, faith, default
'default' clears all focus settings.
Cities automatically assign citizens to tiles. This biases the AI
toward the chosen yield type when assigning new citizens.
|
| dismiss_popupA | Dismiss any blocking popup in the game UI. Call this if you suspect a popup (e.g. historic moment, boost notification)
is blocking interaction. |
| run_luaA | Run arbitrary Lua code in the game. Advanced escape hatch — prefer built-in tools. Args:
code: Lua code to execute. Use print() for output, end with print("---END---").
context: "gamecore" (default) for read-only state queries.
"ingame" for commands and UI-dependent queries.
Context differences:
gamecore: Players[], GameInfo.*, Map.*, Game.* — safe read-only access.
CANNOT use: UI.*, UnitManager.*, CityManager.*, notifications.
ingame: All APIs including UI.*, UnitManager.*, CityManager.*.
Use for: moving units, setting research, diplomacy actions.
Always use print() for output (not return).
|
| list_lua_statesB | List ALL available Lua state indices and their names. |
| list_savesA | List available save files (normal, autosave). Returns indexed list of saves. Use load_save(save_index=N) to load one.
Call this before load_save to see what's available.
|
| load_saveA | Load a save file by index from the most recent list_saves() result. Args:
save_index: Index number from list_saves output (1-based)
The game will reload entirely. Wait ~10 seconds after calling this,
then use get_game_overview to verify the loaded state.
|
| load_game_saveA | Load a save file by name. No need to call list_saves first. Args:
save_name: Save name without extension (e.g. "0_MCP_0079",
"0A_GROUND_CONTROL", "AutoSave_0221", "quicksave").
Tries Lua-based loading first (fast, ~5s). If the save isn't found
via Lua (common for autosaves/quicksaves), falls back to OCR menu
navigation (~90s) after verifying the file exists on disk.
|
| kill_gameA | Kill the Civ 6 game process and wait for Steam to deregister. Only kills Civ 6 processes. Waits ~10 seconds for Steam to deregister
so the game can be relaunched cleanly.
|
| launch_gameA | Launch Civ 6 via Steam. Starts the game and waits for the process to appear (~15-30 seconds).
The game will be at the main menu after launch — use load_save or
restart_and_load to load a specific save.
NOTE: FireTuner connection is NOT available at the main menu.
Only in-game MCP tools work after a save is loaded.
|
| load_save_from_menuA | Navigate the main menu to load a save via OCR-guided clicking. Args:
save_name: Autosave name (e.g. "AutoSave_0221"). If not provided,
loads the most recent autosave.
Requires the game to be running and at the main menu. Uses macOS Vision
OCR to find and click menu elements. Takes 30-90 seconds.
After loading, wait ~10 seconds then call get_game_overview to verify.
Requires pyobjc: uv pip install 'civ6-mcp[launcher]'
|
| restart_and_loadA | Full game recovery: kill, relaunch, and load a save. Args:
save_name: Autosave name (e.g. "AutoSave_0221"). If not provided,
loads the most recent autosave.
This is the recommended tool for recovering from game hangs (e.g. AI turn
processing stuck in infinite loop). Takes 60-120 seconds total:
1. Kills the game process
2. Waits for Steam to deregister (~10s)
3. Relaunches via Steam (~15-30s for process start + main menu)
4. Navigates menus via OCR to load the save (~30-60s)
After completion, wait ~10 seconds then call get_game_overview to verify.
|
| write_strategic_summaryA | Write a strategic summary for long-term memory. Call this every 5-10 turns to compress recent history into a compact
strategic context. This persists to disk and survives session restarts.
Args:
turn: Current turn number.
summary: 2-3 sentences summarizing your empire state and situation.
goals: Current long-term goals (victory target, expansion plans).
threats: Major threats (hostile neighbors, barbarians, resource gaps).
opportunities: Current opportunities (weak neighbors, settle spots).
key_decisions: Important recent decisions and their rationale.
Returns:
Confirmation string.
|
| read_strategic_summaryA | Read the current strategic summary from long-term memory. Call this at the start of each turn cycle to re-establish strategic
context that may have been lost from the conversation window.
Returns goals, threats, opportunities, recent decisions, and
a compressed history of key moments. Summaries are stored per game —
a new game starts with a clean slate (no cross-game contamination). |
| record_learningA | 把本局教训写进跨局学习库(下局 T1-T3 简报自动注入)。 局末必调:lesson 写「这局最该被记住的一件事」(一句话,可操作);
result 写结果,如「失败(T384 美国文化胜利)」。事实字段(损失/探索率/
红警回合)由服务端从复盘日志自动提取,不用你报。
standing_insight 单独一层:跨局恒真的规则性教训(如「原版规则集下
法典完成前不能排政策卡」),不随局淘汰 —— 只在确认是规则而非局势时用。
局中也可以调(比如刚被教训过),重调同一局会覆盖而非重复。
|
| get_learningsA | 查看跨局学习库:往局结果/教训/致命问题 + 跨局恒真规则。 开局定策略、或怀疑自己在重蹈往局覆辙时调。简报只注入最近 3 局的
一句话版本,这里是完整视图。
|
| assess_attackA | 战前评估:这座敌城能不能打。四档判定(可打/需准备/不推荐/会全灭)+理由+替代方案。 城防值/城血/城墙**自动向引擎实读**(城在视野内即可),连同我方兵力、
守军、补给线一起算出"每回合净伤"和破城回合数:净伤 ≤ 城市回血(20/回合)
直接判 🔴——这正是罗马局 T177-191 伦敦的情形(CS55 火枪手打城防 80,
每击 10-15 伤,城市回满)。城不在视野时城防读不到,此时【不会给绿灯】。
参数只在你有更新的侦察情报时才需要显式传(显式值优先)。宣战前必调。
|
| suggest_siege_planA | 攻城计划:3-5 步战术模板(站位→削墙→收尾→占领)。仅当战前评估为
可打/需准备时给计划;不推荐/会全灭时会拒绝并说明先补什么条件。 |
| get_post_war_adviceA | 占领城市后的处理建议:保留/挽救/夷平,基于忠诚度计算。占城当回合调用。 ⚠️ 敌方城市的人口数据无法自动获取 —— 忠诚估算只计入我方压力,结果
偏乐观;若周边敌城密集,把建议降一档理解(保留→挽救,挽救→夷平)。
|
| get_pillage_adviceA | 掠夺经济:对指定区域内的敌方改良/区域估价排序,给掠夺路线。
战争期间对敌方腹地调用;矿山/区域优先,已掠夺过的格子自动排除。 |
| assess_loyalty_flipA | 忠诚翻转评估:敌方城市能不能不费一兵一卒翻过来。
city_population 从你的侦察读(城市横幅显示人口)。
⚠️ 仅在本规则集有忠诚度机制时可用 —— 忠诚度是 Rise & Fall 的机制,
原版(RULESET_STANDARD)上不存在,此时本工具会明确拒答而不是给你
一个凭空算出来的数。
⚠️ 敌方其他城市的支撑压力无法自动获取,估算偏乐观 —— 目标城离敌方
腹地越近,实际越难翻。 |
| assess_settle_locationA | 铺城位置六维深评(产出之外):战略资源/奢侈覆盖/防御地形/扼守/
忠诚度/卡位。对 get_settle_advisor 给出的候选点逐个调用,再定最终落点。 |
| get_opening_assessmentA | 开局四维评估:文明能力利用率 × 地图地理 × 邻居威胁 → 推荐路线
(含备选与不推荐,带置信度)。T1-T5 必调一次;之后想复审路线也可再调。
未收录进策略库的文明会得到诚实的降级评估,不会编造能力。 |
| get_strategy_notesA | 查本文明套件:特色单位/战力代差/窗口开关时代 + 策略库原理(若收录)。
civ_or_leader 留空 = 查自己的文明。也可查对手文明来理解他会怎么打。 主路径是【运行时从 gamedata 推导】,所以任意随机文明都有输出;
手写策略库(3 个文明)只作为覆盖层追加。
|
| get_expert_playbookA | 查高玩知识库:人类社区共识的通用打法原理(文明无关)。 与 get_strategy_notes 互补:那边是本文明的套件与原理,这边是换任何
文明都成立的判断力 —— 扩张节奏基准/蛮族机制/宣战窗口/难度加成表/
胜利路线检查表。每条带置信度与来源(规则机制/社区共识/本机实证)。
无参调用返回目录;topic 按主题查;turn 传当前回合可过滤掉不在
适用窗口的条目。定线、开战、扩张这类重大决策前值得对一遍。
|
| get_power_balanceA | 实测我方与对手的差距,给出五档局势判定(被碾压/落后/势均力敌/领先/统治级)。 不看难度名 —— 难度加成表在导出数据里是空的,而且难度可能随机。
判据是各维度「我 / 该维最强对手」的实测比值。这是决定整套打法的分档:
劣势档要停扩张求生,领先档要主动兑现优势。每 10 回合简报里会自动带一行,
本工具用于随时重测。
|