Skip to main content
Glama

purchase_item

Purchase a unit or building instantly using gold or faith. Specify the city, item type, and name to complete the transaction.

Instructions

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

Costs gold/faith immediately. Use get_city_production to see what's available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
city_idYes
item_typeYes
item_nameYes
yield_typeNoYIELD_GOLD

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses immediate gold/faith cost, but lacks details on error handling (e.g., insufficient resources), reversibility, or permission requirements. The behavioral disclosure is adequate but incomplete.

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: a one-sentence summary followed by a brief list of args, then behavioral note and suggestion. No redundant information, and the key purpose is front-loaded.

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?

Given the presence of an output schema (not needed to explain return values), the description covers parameter meanings, cost, and a useful prerequisite. Missing is the behavior on failure (insufficient resources) or validation of item_name/type. Still, it is largely complete for a 4-param tool with output schema.

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?

Schema has 0% description coverage, so the description is the sole source of parameter meaning. It explains all four parameters: city_id (from get_cities), item_type (UNIT/BUILDING), item_name with examples, and yield_type with default. This adds significant value 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 purchases a unit or building instantly with gold or faith. It distinguishes from siblings like purchase_tile (tiles) and upgrade_unit (upgrades), and provides specific resource context.

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 advises using get_city_production to see available items, which is a clear prerequisite. However, it doesn't explicitly contrast with alternatives like purchase_tile or upgrade_unit, or state when not to use the tool.

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