Skip to main content
Glama

upgrade_unit

Upgrade a unit to its next type by spending gold and remaining movement, provided the required technology is known.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unit_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description must disclose all behavioral traits. It reveals that upgrading consumes movement and requires tech and gold, but omits other important aspects such as whether the old unit is replaced, the exact gold cost, or what happens if conditions are not met.

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

Conciseness5/5

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

The description is concise, using only two sentences plus an Args section. It is front-loaded with the core purpose and provides essential constraints in a structured format without extraneous information.

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

Completeness3/5

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

Given that an output schema exists, the description does not need to detail return values. However, it lacks information on error scenarios (e.g., insufficient gold), irreversible effects, or confirmation steps, which would improve completeness for a mutation tool.

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

Parameters4/5

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

The input schema only declares unit_id as an integer with no description. The tool description compensates by explaining that unit_id is 'the unit's composite ID (from get_units output)', providing crucial context beyond the 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 clearly states the tool's purpose: 'Upgrade a unit to its next type' with a concrete example (Slinger -> Archer). It distinguishes itself from the sibling tool 'promote_unit' by focusing on unit type upgrades rather than promotions.

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 lists clear prerequisites: right technology, enough gold, and moves remaining. It also notes that movement is consumed. However, it does not explicitly mention when not to use this tool or suggest alternatives like 'unit_action' for more complex 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