Skip to main content
Glama
ty-meador

civ-v-llm-harness

by ty-meador

upgrade_unit

Upgrades a Civilization V unit along its path for gold when requirements are met. Returns a new unit_id, so use that replacement ID for future orders.

Instructions

Upgrade a unit for gold along its upgrade path (e.g. Warrior -> Swordsman). Needs full moves, own/allied territory, the gold and any strategic resource. The engine replaces the unit: use the returned unit_id (new) from now on, not the one passed in. available_unit_actions lists COMMAND_UPGRADE when possible.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unit_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.11.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the critical non-obvious behavior: the engine replaces the unit and the returned unit_id must be used going forward, not the one passed in. That is exactly the kind of gotcha an agent needs. It does not cover failure modes (e.g. what happens if prerequisites are unmet), so it stops short of a 5.

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?

Four tight sentences with no filler; the core action and cost lead, followed by prerequisites, the id-replacement warning, and the discovery pointer. Slightly dense but every sentence earns its place.

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

Completeness4/5

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

There is no output schema, and the description compensates by explaining the returned unit_id, which is the key return-value detail. Prerequisites and the availability check via available_unit_actions are covered. Remaining gaps are edge-case failure behavior and how to discover valid unit_ids.

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

Parameters3/5

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

One parameter with 0% schema description coverage, so the description must compensate. It clarifies that unit_id refers to the unit being upgraded and that this id is invalidated after the call, which is meaningful beyond the schema. However, it never states whether unit_id is the player's unit identifier format or how to obtain it, so the coverage gap is only partially closed.

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?

States a specific verb (upgrade) and resource (a unit) plus the mechanism and cost ('for gold along its upgrade path'), with a concrete example (Warrior -> Swordsman). It is clearly distinguishable from siblings like move_unit, disband_unit, or unit_mission.

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?

Explicitly lists the conditions required to use it (full moves, own/allied territory, the gold and any strategic resource) and routes the agent to available_unit_actions to check for COMMAND_UPGRADE availability. It lacks an explicit 'when not to use / use X instead' pointer to alternatives such as disband_unit, but the preconditions are unusually concrete.

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

Deploy Server

Other Tools