Skip to main content
Glama

unit_action

Command a Civilization VI unit to move, attack, fortify, build improvements, spread religion, or perform other actions using its unit ID and optional target coordinates.

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
actionYes
unit_idYes
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 for each action: prerequisites, side effects (e.g., 'deletes permanently disbands'), charge costs, and resource costs (Iron/Coal for railroads). No contradictions with missing annotations.

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 well-structured with a summary, args list, and per-action sections. It front-loads the purpose. However, it is somewhat verbose (e.g., repeating 'for improve' in two places). Minor redundancy.

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 (19 actions with diverse requirements), the description is comprehensive: it covers all actions, their parameter needs, prerequisites, and edge cases (e.g., 'Traders only, must be idle'). An output schema exists, so return values are not needed.

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?

Given 0% schema coverage, the description compensates fully by explaining each parameter's role: unit_id source, action enum values, target_x/y required for certain actions, improvement examples. It adds meaning beyond the bare schema.

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 starts with a clear verb+resource 'Issue a command to a unit.' It then lists 19 specific actions, each with distinct behavior, making it easy to distinguish from siblings like city_action which targets cities.

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

Usage Guidelines4/5

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

The description provides explicit per-action usage rules (e.g., 'For move/attack: provide target_x and target_y', 'Builder must be on the tile'). However, it lacks explicit when-not-to-use or direct comparisons to sibling tools.

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

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