Skip to main content
Glama

unit_action

Issue commands to units in Civilization VI: move, attack, fortify, found cities, improve tiles, activate Great People, and more, with support for builders, military engineers, and religious units.

Instructions

Issue a command to a unit.

Args:
    unit_id: The unit's composite ID (from get_units output)
    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, teleport, spread_religion
    target_x: Target X coordinate (required for move/attack/trade_route/teleport)
    target_y: Target Y coordinate (required for move/attack/trade_route/teleport)
    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 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.
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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unit_idYes
actionYes
target_xNo
target_yNo
improvementNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fully discloses behavioral traits: consequences (e.g., 'sacrifice_charges spends ALL builder charges', 'delete = permanently disband'), conditions, and state changes ('heal = fortify until healed').

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured with an arg list followed by per-action notes, but it is somewhat lengthy due to exhaustive detail. Front-loaded purpose is clear, but could be slightly more succinct without losing value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (20+ actions, varying parameters, multiple prerequisites), the description is fully complete, covering all actions, input requirements, special cases, and edge behaviors. No critical gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description adds extensive meaning: explains unit_id source, lists all action values with context, details when target_x/y are required, and gives improvement examples. No parameter is left unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Issue a command to a unit' and enumerates all possible actions, distinguishing it from sibling tools like city_action or promote_unit which handle different entity types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Detailed per-action guidelines are provided, including prerequisites (e.g., 'Builder must be on the tile' for improve, 'Traders only, must be idle' for teleport), parameter requirements, and exclusions (e.g., 'no target needed' for certain actions).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/lmwilki/civ6-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server